home *** CD-ROM | disk | FTP | other *** search
/ Hackers Underworld 2: Forbidden Knowledge / Hackers Underworld 2: Forbidden Knowledge.iso / HACKING / BEGUNIX.TXT < prev    next >
Text File  |  1994-07-17  |  337KB  |  7,927 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                                   UNIX for Beginning Users
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.                             Developed by:
  37.  
  38.                                    User Liaison Section, D-7131
  39.                                    Denver Office
  40.            
  41.                             [Name and Phone number deleted at authors
  42.                              Request]
  43.  
  44.                             Revision Date:  September 16, 1991
  45. I.  INTRODUCTION
  46.  
  47.  
  48. A.  Audience
  49.  
  50.  
  51. This course is for individuals who will be using the UNIX
  52. operating system on a Reclamation computer platform.  It is
  53. assumed that the student has a general understanding of data
  54. processing concepts.
  55.  
  56.  
  57.  
  58. B.  Course Objectives
  59.  
  60.  
  61. Upon successful completion of this course the student will be
  62. able to:
  63.  
  64.        1.     Demonstrate a knowledge of basic UNIX ideas.
  65.  
  66.        2.     Recognize the different types of files and the file
  67.               structure.
  68.  
  69.        3.     Log in and out of UNIX using an interactive terminal.
  70.  
  71.        4.     Change the password and be aware of other
  72.               responsibilities of owning an account.
  73.  
  74.        5.     Demonstrate a knowledge of where to get help.
  75.  
  76.        6.     Use the appropriate UNIX commands to display/print  
  77.               files, copy/move files, change file access permissions,
  78.               create/delete directories, and change the current
  79.               working directory.
  80.  
  81.        7.     Transfer a file to another computer platform using File
  82.               Transfer Protocol (FTP).  Use FTP commands to do the
  83.               following:  initialize FTP, establish connection, local
  84.               computer commands, remote computer commands, close
  85.               connection, exit FTP, help command, and special
  86.               functions.
  87.  
  88.        8.     Use an editor to create files, input text,
  89.               insert/replace text, copy/move text, and exit/save
  90.               changes.
  91.  
  92.        9.     Use the mail utility to send/receive/delete messages
  93.  
  94.        10.    Use basic Annex commands to reestablish connection to a
  95.               disconnected process.
  96. C.  Course Handout Conventions
  97.  
  98.  
  99. There are several conventions used in this handout for
  100. consistency and easier interpretation:
  101.  
  102.  
  103.        1.     Samples of actual terminal sessions are single-lined
  104.               boxed.
  105.  
  106.  
  107.        2.     User entries are shown in bold print and are
  108.               underlined.
  109.  
  110.               QUIT
  111.  
  112.  
  113.        3.     All keyboard functions in the text will be bold.  
  114.  
  115.               (Ret)                       Backspace
  116.               Tab                         Ctrl-F6
  117.               Print (Shift-F7)            Go to DOS (1)
  118.  
  119.               NOTE:         (Ret) indicates the Return or Enter key
  120.                             located above the right Shift key.
  121.  
  122.  
  123.        4.     Examples of user entries not showing the computer's
  124.               response are in dotted-lined boxes.                     
  125.               
  126.  
  127.  
  128.        5.     Command formats are double-lined boxed.
  129.  
  130.  
  131.        6.     Three dots either in vertical or horizontal alignment
  132.               mean continuation or that data is missing from the
  133.               diagram.
  134.  
  135. ┌───────────────────────────────────────────────────────────────┐
  136. │                                                               │
  137. │                                                               │
  138. │        Multimax, Nanobus, and UMAX are trademarks of          │
  139. │        Encore Computer Corporation                            │
  140. │                                                               │
  141. │                                                               │
  142. │        Annex is a trademark of XYLOGICS, Inc                  │
  143. │                                                               │
  144. │                                                               │
  145. │        UNIX and Teletype are registered trademarks of         │
  146. │        AT&T Bell Laboratories                                 │
  147. │                                                               │
  148. │                                                               │
  149. │        Ethernet is a trademark of Xerox Corporation           │
  150. │                                                               │
  151. │                                                               │
  152. │                                                               │
  153. └───────────────────────────────────────────────────────────────┘
  154.  
  155. 1.  BASIC UNIX IDEAS
  156.  
  157.  
  158. The UNIX operating system is a set of programs that act as a link
  159. between the computer and the user.  The programs that allocate
  160. the system resources and coordinate all the details of the
  161. computer's internals is called the operating system or kernel.
  162.  
  163. Users communicate with the kernel through a program known as the
  164. shell.  The shell is a command line interpreter; it translates
  165. commands entered by the user and converts them into a language
  166. that is understood by the kernel.
  167.  
  168. Here is a basic block diagram of a UNIX system.
  169.  
  170.  
  171.                     Spread Sheet  Compilers  
  172.                     Calculators       │
  173.                          │            │
  174.                          V            V      
  175.                  ┌───────────────────────────────┐
  176.                  │          The Shell            │   Mail and
  177.                  │   ┌──────────────────────┐    │<- Message
  178.     Inventory    │   │  UNIX system kernel  │    │   Facilities
  179.     Control  --->│   │   ┌──────────────┐   │    │
  180.     Systems      │   │   │              │   │    │<- Interpreters 
  181.                  │   │   │   Hardware   │   │    │
  182.     Formatters ->│   │   │              │   │    │<- DBMS
  183.                  │   │   │              │   │    │
  184.     Calendar     │   │   └──────────────┘   │    │   Word
  185.     Systems ---->│   │                      │    │<- Processors
  186.                  │   └──────────────────────┘    │
  187.     Editors ---->│                               │<- FTP
  188.                  └───────────────────────────────┘
  189.  
  190. The designers of UNIX used the following Maxims while writing the
  191. new operating system.
  192.  
  193.        1.     Make each program do one thing well.  These simple
  194.               programs would be called "tools."
  195.  
  196.        2.     Expect the output of every program to be the input to
  197.               another program.
  198.  
  199.        3.     Don't stop building new "tools" to do a job.  The
  200.               library of tools should keep increasing.
  201. 1.1  The UNIX System
  202.  
  203.  
  204. The main concept that unites all versions of UNIX is the
  205. following four basics:
  206.  
  207.  
  208. Kernel 
  209.  
  210. The kernel is the heart of the operating system.  It schedules
  211. tasks and manages data storage.  The user rarely interfaces with
  212. the kernel directly.  This is the memory resident portion of the
  213. operating system.
  214.  
  215.  
  216. Shell
  217.  
  218. The shell is the utility that processes your requests.  When you
  219. type in a command at your terminal, the shell interprets the
  220. command and calls the program that you want.  The shell will
  221. support multiple users, multiple tasks, and multiple interfaces
  222. to itself.  The shell uses standard syntax for all commands. 
  223. There are two popular shells currently available, the BourneShell
  224. (standard System V UNIX) and the CShell (BSD UNIX).  Because
  225. separate users can use different shells at the same time, the
  226. system can appear different to different users.  There is another
  227. shell known as the KornShell (named after its designer), which is
  228. popular with programmers.  This ability to provide a customized
  229. user interface is one of the most powerful features of UNIX.
  230.  
  231.  
  232. Commands and Utilities
  233.  
  234. Separate utilities can be easily combined to customize function
  235. and output.  They are flexible, adaptable, portable, and modular. 
  236. They use pipes and filters.  There are over 200 standard commands
  237. plus numerous others provided through 3rd party software.
  238.  
  239.  
  240. Files and Directories
  241.  
  242. The directory system supports a multilevel hierarchy.  Files and
  243. directories have access protection.  Files and directories are
  244. accessed through pathnames.  Files support multiple name links. 
  245. Removable filesystems are also supported.
  246. 1.2  File Structure
  247.  
  248.  
  249. All data in UNIX is organized into files.  All files are
  250. organized into directories.  These directories are organized into
  251. a tree-like structure called the filesystem.  The following
  252. diagram describes the top level organization of the UNIX
  253. filesystem:
  254.  
  255.                               /
  256.                             (root)                       
  257.                               │                       
  258.    ┌───────┬───────┬───────┬──┴────┬──────┬──────┐        
  259.    │       │       │       │       │      │      │     
  260.  bin      dev     etc     lib     tmp    usr   users      
  261.                                                  
  262.  
  263. These directories, in turn, are also organized hierarchically.
  264.  
  265.  
  266. For example:
  267.                               /
  268.                               │                 
  269.         ┌──────────────────┬──┴────────────────────┐
  270.         │                  │                       │
  271.        dev                etc                     usr             
  272.         │                  │                       │
  273.     ┌───┴──┐           ┌───┴──┐        ┌────────┬──┴───────────┐
  274.     │      │           │      │        │        │              │
  275.   dsk     rmt       init.d  rc0.d    mail      adm          spool
  276.                                                 │             
  277.                                             ┌───┴───┐            
  278.                                             │       │         
  279.                                           acct     sa
  280.  
  281.  
  282. In this example, dev, etc, usr, and adm are directories. 
  283. Directories contain other files or directories. Plain files
  284. contain text or binary data and contain no information about
  285. other files or directories.
  286. Users can make use of this same structure to organize their
  287. files.
  288.  
  289. For example:
  290.                          / 
  291.                          │
  292.         ┌────────────────┼─────────────┐
  293.         │                │             │        
  294.        bin             users          dev
  295.                          │
  296.            ┌─────────────┴───────────────┐         
  297.            │                             │      
  298.         bsmith                         sjones          
  299.            │                             │      
  300.      ┌─────┴────┐             ┌──────────┴───┬──────────┐ 
  301.      │          │             │              │          │
  302.    memos      progs        physics          chem     history
  303.      │          │             │              │          │  
  304.   ┌──┴──┐    ┌──┴───┐      ┌──┴───┐       ┌──┴──┐      ┌┴──┐
  305.   │     │    │      │      │      │       │     │      │   │
  306.  mfg   eng   c     f77   mods   calcs   forms  notes  loc anc
  307.  
  308.  
  309. Every file has a name.  A filename is composed of one to fourteen
  310. characters.  Although you can use almost any character in a
  311. filename, you will avoid confusion if you choose characters from
  312. the following list.
  313.  
  314.        1.     upper case letters [A-Z]
  315.        2.     lower case letters [a-z]
  316.        3.     numbers [0-9]
  317.        4.     underscore [_]
  318.        5.     period [.]
  319.        6.     comma [,]      
  320.  
  321. The only exception is the root directory, which always uses the
  322. symbol /.  No other directory or file can use this symbol.
  323.  
  324. Like children of one parent, no two files in the same directory
  325. can have the same name.  Files in different directories, like
  326. children of different parents, can have the same name.
  327.  
  328. The filenames you choose should mean something.  Too often, a
  329. directory is filled with important files with names like foobar,
  330. wombat, and junk.  A meaningless name won't help you recall the
  331. contents of a file.  Use filenames that are descriptive of the
  332. contents.
  333. 1.3 UNIX System Files
  334.  
  335. In order for you to have a basic understanding of the contents of
  336. some of the system directories, here is a partial list of those
  337. directories and what files they contain:
  338.  
  339. /bin                 This is where the executable files are located.
  340.                      They are available to all user.
  341.  
  342. /dev                 These are device drivers.
  343.  
  344. /etc                 Supervisor directory commands, configuration
  345.                      files, disk configuration files, reboot files,
  346.                      valid user lists, groups, ethernet, hosts, where
  347.                      to send critical messages.
  348.  
  349. /lib                 compiler libraries
  350.  
  351. /tmp                 scratch processes, editors, compilers, and
  352.                      databases
  353.  
  354. /bsd                 Berkeley commands
  355.  
  356. /mnt                 empty, used for disks
  357.  
  358. /stand               boot information
  359.  
  360. /lost+found          orphans go here (look here after system crash)
  361.  
  362. /unix*               executable, bootable kernel
  363.  
  364. This is not an exhaustive list of directories that contain system
  365. information but it is intended to remove some of the mystery
  366. behind these directories and the types of files they contain.
  367. 1.4  Command Line Syntax
  368.  
  369.  
  370. Users enter commands at the shell prompt.  The default
  371. BourneShell prompt is the dollar sign ($).  In general, the shell
  372. expects to see the following syntax:
  373.  
  374. ╔═══════════════════════════════════════════════════════════════╗
  375. ║  Command Format:  command  options  arguments                 ║
  376. ╚═══════════════════════════════════════════════════════════════╝
  377.  
  378.  
  379. Command       -      This is the UNIX command.  Sometimes the command
  380.                      is representative of the function.  For example,
  381.                      the command to list the contents of a directory is
  382.                      ls.  The first and third letters of the word
  383.                      "list" are used.  Unfortunately, this is not
  384.                      always the case.
  385.  
  386.  
  387. Options       -      These are also known as flags.  The common form
  388.                      is:
  389.                                              -A
  390.  
  391.                      where A is the abbreviation of the optional
  392.                      function of the command.  For example, the command
  393.                      ls lists the contents of a directory, while the
  394.                      command ls -l provides a long listing and ls -C
  395.                      provides output in columns.  Several options can
  396.                      be combined following one '-'; for example -CF, or
  397.                      they can be entered separately as -C -F.
  398.  
  399.  
  400. Arguments     -      These can be file names, user names, or qualifiers
  401.                      to the command or one of its options.
  402. Example:
  403.  
  404. .................................................................
  405. . $ls -CF sjones                                                .
  406. .................................................................
  407.  
  408.  
  409. The UNIX command is ls list contents of directory the dash (-)
  410. indicates the options.
  411.  
  412.  
  413.      C  =     Multiple-column output with entries sorted down the
  414.               columns
  415.  
  416.      F  =     Put a slash (/) after each filename if that file is a
  417.               directory and put an asterisk (*) after each filename
  418.               that is executable.
  419.  
  420. sjones  =     name of the directory to list (it can be a 
  421.           relative or absolute pathname)
  422.  
  423.  
  424. Example:
  425.  
  426. .................................................................
  427. . $diff memo1 memo2                                             .
  428. .................................................................
  429.  
  430.  
  431. diff          - differential file comparator command
  432.  
  433. memo1         - filename argument
  434.  
  435. memo2         - filename argument
  436.  
  437.  
  438. This command will tell what lines must be changed in two files to
  439. bring them into agreement.
  440. Here is another example that doesn't fit the general syntax for
  441. UNIX commands.  
  442.  
  443. Example:
  444.  
  445. .................................................................
  446. . $find . -atime +7 -print                                      .
  447. .................................................................
  448.  
  449.                                                                  
  450. find          -      find files
  451.  
  452. .             -      the current working directory
  453.  
  454. -atime        -      True if the file has been accessed in n days (n is
  455.                      the +7)
  456.  
  457. -print        -      always true; causes the current path name to be
  458.                      printed
  459.  
  460.  
  461. So, this command will give a listing of all files in your current
  462. working directory that have been accessed in the past seven days.
  463.  
  464. Some commands have several options and/or arguments; while
  465. others, like passwd and mail, are interactive and will prompt the
  466. user for additional input.
  467. 1.5  Correcting Mistakes
  468.  
  469.  
  470. Because the shell and most other utilities do not interpret the
  471. command line (or other text) until you press the (Ret) key, you
  472. can correct typing mistakes before you press (Ret).  There are
  473. two ways to correct typing mistakes.  You can erase one character
  474. at a time, or you can back up to the beginning of the command
  475. line in one step.   After you press (Ret), it is too late to make
  476. a correction.
  477.  
  478.  
  479.  
  480. 1.5.1  Erasing Characters
  481.  
  482.  
  483. When entering characters from the keyboard, you can backspace up
  484. to and over a mistake by pressing the erase key (#) one time for
  485. each character you wish to delete.  The # will appear on the
  486. screen, and the character preceding it will be discounted.
  487.  
  488.  
  489. Example:
  490.  
  491. .................................................................
  492. . $ls phajne#y                                                  .
  493. .................................................................
  494.  
  495.  
  496. In this example, the e will be ignored and ls phajny is sent to
  497. the Multimax.  Multiple typos can be erased; simply press one #
  498. for each character to be erased.  The erase key will back up as
  499. many characters as you wish, but it will not back up past the
  500. beginning of the line.
  501.  
  502.  
  503.  
  504. 1.5.2  Deleting an Entire Line
  505.  
  506. You can delete an entire line you are entering any time before
  507. you press (Ret) by pressing the kill key (@).  When you press the
  508. @ (kill key), the cursor moves down to the next line and all the
  509. way to the left.  The shell doesn't give you another prompt, but
  510. it is as though the cursor is following a prompt.  The operating
  511. system does not remove the line with the mistake but instead
  512. ignores it.  Now enter the command (or text) again from the
  513. start.
  514. 1.5.3  Aborting Program Execution
  515.  
  516.  
  517. Sometimes you may want to terminate a running program.  UNIX
  518. might be performing a listing that is too long to display on your
  519. screen or for some other reason you want to terminate execution. 
  520. To terminate program execution press the Delete key.  The
  521. operating system sends a terminal interrupt signal to the shell. 
  522. When the shell receives this signal, it displays a prompt and
  523. waits for another command.
  524.  
  525.  
  526.  
  527. 1.5.4  Controlling Output to the Screen
  528.  
  529.  
  530. There are several ways to control the flow of characters to the
  531. screen as a result of executing a command.  Such as:
  532.  
  533.  
  534. Ctrl-S               -      This keyboard function command will suspend
  535.                             the flow of characters to the screen as the
  536.                             result of executing a command.  The screen
  537.                             will not continue until the keyboard function
  538.                             to resume output is given.
  539.  
  540.  
  541. Ctrl-Q               -      This keyboard function command will resume
  542.                             the output to the screen.
  543.  
  544.  
  545. Hold Screen          -      If your terminal has this key (i.e. VT200),
  546.                             you can press it once to stop output to the
  547.                             screen.  To resume output to the screen,
  548.                             press the key again.
  549.  
  550.  
  551. Denver BOR MULTIMAX
  552.  
  553. Each BOR Multimax 310 has four 15 Megahertz National
  554. Semiconductor 32-bit processors with 64 kilobytes of cache memory
  555. rated at 2 million instructions per second (MIPS) for a total of
  556. 8 MIPS. The main memory consists of 32 megabytes (million bytes).
  557. There can be a maximum of 14 disk drives. Each drive has a
  558. capacity of 600 megabytes for a total capacity of 8.4 gigabytes
  559. (a gigabyte is one thousand million bytes)
  560.  
  561. Connection to the Multimax is accomplished through one of several
  562. methods. Access is made through TCP/IP based Annex terminal
  563. servers. The two Annex II servers have 32 ports each and the
  564. Annex I has 16 ports. The Annex II servers will allow up to 64
  565. users access to the two Multimax computers. The Annex I is used
  566. for access to the on-line printers. CDCnet and TELNET are other
  567. ways to gain access to the Multimaxes.
  568.  
  569. Printouts are handled on a 600-line-per-minute line printer and a
  570. 10-page-per-minute laser printer. Each Multimax has a hardcopy
  571. terminal and a CRT to serve as an operator console. There are two
  572. tape drives capable of 1600 or 6250 bits per inch (bpi) on each
  573. system. There is also a cassette tape drive.
  574.  
  575. Software available are FORTRAN, COBOL, C, and UNISOL (an
  576. accounting package). The database management system is INGRES by
  577. Relational Technology, Inc.  PROCOMM+ will be the communication
  578. interface with IBM PC's and compatibles. The operating system for
  579. the Multimax is UMAX V. UMAX V is the name for the Encore
  580. implementation of UNIX System V.
  581. 1.6  Logging on the Annex
  582.  
  583.  
  584. This sample session shows how the login process is displayed on
  585. the terminal screen and is uniform for all users.  To bring the
  586. standard menu onto the screen, press the Space Bar.  If you are
  587. using a PC, first start PROCOMM+.  Then when you are in the
  588. Terminal-Mode Screen, press the Space Bar; and the MICOM menu
  589. will appear.
  590.  
  591.  
  592. NOTE:         Login procedures from the regions are included in the
  593.               back of this manual
  594.  
  595.  
  596. Sample Session:
  597.  
  598. ┌───────────────────────────────────────────────────────────────┐
  599. │ WELCOME TO THE B.O.R. NETWORK P/S:B                           │
  600. │ SYSTEMS PRESENTLY AVAILABLE ARE:                              │
  601. │                                                               │
  602. │  **SYSTEM**         **NAME**                                  │
  603. │                                                               │
  604. │ VAX 8300'S            VAX                                     │
  605. │ CYBER/CDCNET F.E.     CDC                                     │
  606. │ ENCORE/UNIX           MAX                                     │
  607. │ OUT DIAL              OD                                      │
  608. │                                                               │
  609. │ TO SELECT A SYSTEM, ENTER THE SYSTEM                          │
  610. │ NAME AND CARRIAGE RETURN AT NEXT                              │
  611. │ PROMPT.                                                       │
  612. │                                                               │
  613. │ CHANNEL 08/061. ENTER RESOURCE MAX                            │
  614. │                                                               │
  615. └───────────────────────────────────────────────────────────────┘
  616.  
  617.  
  618. MAX is the resource name you must enter to be connected to the
  619. Annex, which is the Multimax front end processor.  Some MICOM
  620. menus might not have the MAX selection; in this case, enter MAX
  621. to select the Annex.  This is the same as if the menu showed the
  622. option.
  623. After entering MAX you will see something similar to the
  624. following:
  625.  
  626. Sample Session:
  627.  
  628. ┌───────────────────────────────────────────────────────────────┐
  629. │ CONNECTED TO 06/011                                           │
  630. └───────────────────────────────────────────────────────────────┘
  631.  
  632. This indicates that you are connected to the port selector.  Wait
  633. two seconds, press (Ret) twice, and the annex prompt will appear
  634. after a warning message.
  635.  
  636.  
  637. Sample Session:
  638.  
  639. ┌────────────────────────────────────────────────────────────────────────────┐
  640. │                                                                            │
  641. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.         │
  642. │                                                                            │
  643. │  ***WARNING***Unauthorized access to U.S. Government computers             │
  644. │                is punishable by fine and/or imprisonment. ***WARNING***    │
  645. │ annex:                                                                     │
  646. └────────────────────────────────────────────────────────────────────────────┘
  647. 1.7  Logging on the Multimax
  648.  
  649.  
  650. To establish a connection between the Annex and the Multimax
  651. enter the following command at the Annex prompt:
  652.  
  653. ╔═══════════════════════════════════════════════════════════════╗
  654. ║  Command Format:  rlogin <host>                               ║
  655. ║                                                               ║
  656. ║     host - name of the Multimax                               ║
  657. ╚═══════════════════════════════════════════════════════════════╝
  658.  
  659. The Denver Multimaxes have been assigned the names domax0 and
  660. domax1.  The names stand for the Denver Office Multimax System 0
  661. and 1.  The domax0 is used for production of Bureau-wide
  662. applications.  The domax1 is used for training and application
  663. development and it is the one to use for exercises associated
  664. with this course.
  665.  
  666.  To enter domax1 type:
  667.  
  668. Sample Session:
  669.  
  670. ┌───────────────────────────────────────────────────────────────┐
  671. │ annex:rlogin domax1                                           │
  672. └───────────────────────────────────────────────────────────────┘
  673.                               or
  674. ┌───────────────────────────────────────────────────────────────┐
  675. │ annex:r domax1                                                │
  676. └───────────────────────────────────────────────────────────────┘
  677.  
  678. NOTE:         Abbreviations are allowed for the Annex commands, the
  679.               only requirement is to type in enough characters to
  680.               make it unique.
  681.  
  682.  
  683. When the Annex has opened communications with the selected host,
  684. the following prompt will appear:
  685.  
  686.  
  687. Sample Session:
  688.  
  689. ┌───────────────────────────────────────────────────────────────┐
  690. │ login:                                                        │
  691. └───────────────────────────────────────────────────────────────┘
  692. To connect with the host, enter your login name at the prompt.
  693. Your login name is assigned to you by the system administrator
  694. and typically will be your first initial and last name, all one
  695. word with no spaces.  Only 8 characters are allowed for the
  696. username so extra letters will be truncated.
  697.  
  698. Sample Session:
  699.  
  700. ┌───────────────────────────────────────────────────────────────┐
  701. │ login:rharding                                                │
  702. └───────────────────────────────────────────────────────────────┘
  703.  
  704. Once the login name has been accepted, the next prompt will be
  705. for the password.  The following prompt will appear on the
  706. screen.
  707.  
  708. Sample Session:
  709.  
  710. ┌───────────────────────────────────────────────────────────────┐
  711. │ Password:                                                     │
  712. └───────────────────────────────────────────────────────────────┘
  713.  
  714. Enter your password.  For security reasons, the host will not
  715. display your password as you type it.
  716.  
  717. Sample Session:
  718.  
  719. ┌───────────────────────────────────────────────────────────────┐
  720. │ Password: secret                                              │
  721. └───────────────────────────────────────────────────────────────┘
  722.  
  723. Once you have entered the correct password.  The login procedure
  724. will continue and the following will appear on the monitor
  725. screen.
  726.  
  727. Sample Session:
  728.  
  729. ┌────────────────────────────────────────────────────────────────────────────────┐
  730. │ UNIX System V Release ax.2.2o ns32332                                          │
  731. │ domax1                                                                         │
  732. │ Copyright (c) 1984 AT&T                                                        │
  733. │ All Rights Reserved                                                            │
  734. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  735. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  736. │ $                                                                              │
  737. └────────────────────────────────────────────────────────────────────────────────┘
  738.  
  739. At this point you are successfully signed on to the Multimax. 
  740. The dollar sign ($) is the default prompt for the BourneShell.
  741.  
  742.  
  743.  
  744. 1.8  Logging Off the Multimax
  745.  
  746.  
  747. At the shell prompt $, you can logout of the Multimax using one
  748. of the following methods:  
  749.  
  750.  
  751.        1.     Enter the keyboard function command Ctrl-D.
  752.  
  753.        2.     Type the UNIX command exit.
  754.  
  755.  
  756. Once you have entered the command to logout the following will
  757. appear on the screen:
  758.  
  759.  
  760. Sample Session:
  761.  
  762. ┌───────────────────────────────────────────────────────────────┐
  763. │ $exit                                                         │
  764. │ CLI: Connection closed.                                       │
  765. │ annex:                                                        │
  766. └───────────────────────────────────────────────────────────────┘
  767.  
  768. Once you are back at the Annex prompt, you can establish another
  769. connection or logout of the Annex.
  770. 1.9  Logging Off the Annex
  771.  
  772.  
  773. When the Annex prompt (annex:) appears, you can enter the command
  774. to logout of the Annex.  The command to logout of the Annex is as
  775. follows:
  776.  
  777. ╔═══════════════════════════════════════════════════════════════╗
  778. ║  Command Format:  hangup                                      ║
  779. ╚═══════════════════════════════════════════════════════════════╝
  780.  
  781.  
  782. There is a 60 minute inactivity timeout programmed into the
  783. Annex; however, it is a waste of resources if you don't enter
  784. hangup. When you are finished with your session, be sure to enter
  785. hangup at the annex: prompt.
  786.  
  787. If you don't type anything for 60 minutes, the Annex will log you
  788. out of the system and display the following message:
  789.  
  790.  
  791. Sample Session:
  792.  
  793. ┌───────────────────────────────────────────────────────────────┐
  794. │ *** Annex Port Reset Due to Inactivity Timeout ***            │
  795. │                                                               │
  796. │ Annex Command Line Interpreter                                │
  797. │ DISCONNECTED                                                  │
  798. └───────────────────────────────────────────────────────────────┘
  799.                                                              
  800. When the hangup command has been entered, the following will
  801. appear on the screen:
  802.  
  803.  
  804. Sample Session:
  805.  
  806. ┌───────────────────────────────────────────────────────────────┐
  807. │ annex: hangup                                                 │
  808. │                                                               │
  809. │ Resetting line and disconnecting.                             │
  810. │                                                               │
  811. │                                                               │
  812. │ Annex Command Line Interpreter * Copyright 1988 Xylogics      │
  813. │ annex:                                                        │
  814. │ DISCONNECTED                                                  │
  815. └───────────────────────────────────────────────────────────────┘
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823. 1.10  Changing the Password
  824.  
  825. The following command will change the password.
  826.                                                                  
  827. ╔═══════════════════════════════════════════════════════════════╗
  828. ║    Command Format:     passwd                                 ║
  829. ╚═══════════════════════════════════════════════════════════════╝
  830.  
  831. You will be prompted to enter the existing password (this
  832. question is skipped if you don't have a password).  Next you will
  833. be prompted to enter the new password.  You will then be asked to
  834. enter the new password again.  This will verify that you have not
  835. made a typographical error.  If the two entries are the same, the
  836. password will be changed.  The new password must meet the
  837. following criteria:
  838.  
  839.        NOTE: Some of these items are configurable by the system
  840.        administrator and these reflect the settings for the Denver
  841.        Multimax only.
  842.  
  843.        1.     Each password must have at least six characters.  Only
  844.               the first eight characters are significant.
  845.  
  846.        2.     Each password must contain at least two alphabetic
  847.               characters and at least one numeric or special
  848.               character.  Alphabetic characters can be upper or lower
  849.               case.
  850.  
  851.        3.     Each password must differ from the login name and
  852.               any reverse or circular shift of that login name. 
  853.               For comparison purposes, an upper case letter and
  854.               its corresponding lower case letter are
  855.               equivalent.
  856.  
  857.        4.     A new password must differ from the old by at
  858.               least three characters.  For comparison purposes,
  859.               an upper case letter and its corresponding lower
  860.               case character are equivalent.
  861. Passwords on the Multimax have a thirteen-week expiration period.
  862. At the end of the thirteen weeks, you will be required to change
  863. your password.  Once you have changed the password, you cannot
  864. change it again for two weeks.  This prevents you from
  865. immediately changing back to the old password and eliminates a
  866. possible security violation.  If you try to change the password
  867. before two weeks have passed since the last change, a warning
  868. message will be displayed.
  869.  
  870.  
  871. Sample Session:
  872.  
  873. ┌───────────────────────────────────────────────────────────────┐
  874. │ $passwd                                                       │
  875. │ Changing password for teacher                                 │
  876. │ Old password: secret                                          │
  877. │ Sorry: < 2 weeks since the last change                        │
  878. │ $                                                             │
  879. └───────────────────────────────────────────────────────────────┘
  880.  
  881. NOTE:         This is about as friendly as UMAX will ever get.
  882.  
  883. Try to choose a password that is not easy for someone else to
  884. guess.  The increasing number of computer crimes involving thefts
  885. all point to a need for protecting the system from unauthorized
  886. access.  Do not use words like your birthdate, telephone number,
  887. spouse's name, child's name, etc. for passwords.  Although you
  888. may think passwords are an unnecessary nuisance, they are an
  889. important way to strengthen the security of the computer system.
  890.  
  891.  
  892. 1.11  On-line Manual
  893.  
  894.  
  895. The major source of on-line help is in the form of documentation
  896. known as the on-line manual pages.  The pages are divided into
  897. eight sections.  Section 1 contains entries for UMAX user
  898. commands; the other sections describe administrative tools,
  899. library functions, games, and internal system structure and
  900. calls.
  901.  
  902. To gain access to the on-line manual pages enter the following
  903. command:
  904.  
  905. ╔═══════════════════════════════════════════════════════════════╗
  906. ║      Command Format:   man <command>                          ║
  907. ║                                                               ║
  908. ║      command - the UNIX command you want information about    ║
  909. ╚═══════════════════════════════════════════════════════════════╝
  910.  
  911. NOTE:         The name 'man' stands for manual.
  912.  
  913.  
  914. Example:
  915.  
  916. .................................................................
  917. . $man ls                                                       .
  918. .................................................................
  919.                                                                  
  920.  
  921. This command will display the on-line manual pages for the ls
  922. command.
  923.  
  924. The on-line manual pages entry begins with the command name and a
  925. one line summary followed by a synopsis of the command line
  926. syntax.  Optional flags and arguments are enclosed by square
  927. brackets [].  A detailed description of the command and all of
  928. its options and arguments follow the synopsis.  The description
  929. can include helpful examples.  At the conclusion of the entry,
  930. related files and commands are listed.
  931.  
  932. NOTE:         Most on-line manual pages will fill more than one
  933.               screen.  Be sure to control the output to your screen.
  934. 1.12 who and finger Commands
  935.  
  936. Once you have logged onto the Multimax, you can find out who is
  937. logged on the system with the following commands:
  938.                                                                  
  939. ╔═══════════════════════════════════════════════════════════════╦
  940. ║  Command Format:  who [options]                               ║
  941. ║                                                               ║
  942. ║    options - see man pages for a complete list                ║ 
  943. ║                                                               ║
  944. ╚═══════════════════════════════════════════════════════════════╝
  945.                                                                  
  946. The default output (no options) of the who command lists the
  947. user's login name, terminal line, and the time that the user
  948. logged in.
  949.  
  950.  
  951. Sample Session:
  952.  
  953. ┌───────────────────────────────────────────────────────────────┐
  954. │ $who                                                          │
  955. │ jwheeler          ttyp0     Aug 15 10:26                      │
  956. │ mvlsdba           rt02190   Aug 15 09:25                      │
  957. │ teacher           rt020b0   Aug 15 11:07                      │
  958. │ eholderf          rt021c0   Aug 15 11:03                      │
  959. │ dbowman           rt01150   Aug 15 08:58                      │
  960. │ $                                                             │
  961. └───────────────────────────────────────────────────────────────┘
  962.  
  963. Options will display other information about the users that are
  964. currently logged onto the system.  Some items available are the
  965. amount of time that has elapsed since activity occurred on that
  966. line, the process identifier (PID) of the login process,
  967. comments, and exit information.
  968. A UNIX command that provides a little more information about
  969. users that are logged in the system is the finger command.
  970.  
  971. ╔═══════════════════════════════════════════════════════════════╗
  972. ║  Command Format:  finger [options] [user1]                    ║
  973. ║                                                               ║
  974. ║    options - see on line manual for complete list             ║
  975. ║                                                               ║
  976. ║     user1  - login name                                       ║
  977. ╚═══════════════════════════════════════════════════════════════╝
  978.  
  979. The finger command with no options will list the login name, full
  980. name, terminal name, write status (an asterisk (*) before the
  981. terminal name indicates that write permission is denied), idle
  982. time, login time, office location, and phone number (if known)
  983. for each user that is currently logged in the system.
  984.  
  985.  
  986. Sample Session:
  987.                                                                  
  988. ┌───────────────────────────────────────────────────────────────┐
  989. │ $finger                                                       │
  990. │ Login        Name           TTY       Idle   When     Office  │
  991. │ Jwheeler     Jim Wheeler    ttyp0       16 Wed 10:26   MP     │
  992. │ mvlsdba      Motor Veh Lic  rt02190     16 Wed 09:25   d7160  │
  993. │ teacher      Teacher Acct  *rt020b0        Wed 11:07          │
  994. │ eholderf     Eileen Holder  rt021c0      1 Wed 11:03          │
  995. │ dbowman      Dale Bowman    rt01150        Wed 08:58          │
  996. │ $                                                             │
  997. └───────────────────────────────────────────────────────────────┘
  998. Workshop 1
  999.  
  1000.  
  1001. This workshop will reinforce your understanding of the ideas
  1002. presented in Chapter 1.  Each student is to complete the entire
  1003. workshop.
  1004.  
  1005. DESK EXERCISES
  1006.  
  1007.  
  1008. 1.     What two organizations first developed UNIX?
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014. 2.     In what high level programming language is UNIX written?
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020. 3.     What are some characteristics of UNIX?
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026. 4.     What is Encore Computer Corporations implementation of UNIX
  1027.        called?
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033. 5.     What part of UNIX controls the details of the computer's
  1034.        internal operations?
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040. 6.     What part of UNIX allows the user to communicate with the
  1041.        computer? 
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.                                   Continue on the next page
  1050. 7.     What is the name of the tree-like structure under which all
  1051.        data is stored?
  1052.  
  1053.  
  1054.        
  1055.  
  1056. 8.     What is the name of the highest level directory?
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062. 9.     What symbol represents the highest level directory?
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068. 10.    What is the general syntax of a UNIX command?
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074. 11.    What is the most common form for listing options on a
  1075.        command line? 
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081. 12.    What character would you use to erase a character on the
  1082.        command line?
  1083.  
  1084.  
  1085.  
  1086.  
  1087. 13.    What character terminates the execution of a command?
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093. 14.    What is the default BourneShell prompt?
  1094.  
  1095.  
  1096.  
  1097.  
  1098.                                               
  1099. 15.    How can you control the flow of output to your monitor
  1100.        screen?
  1101.  
  1102.  
  1103. 1.     What annex command is entered to make a connection to the
  1104.        Multimax?
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110. 2.     What is the UNIX command to change the password?
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117. 3.     How long is your password valid?
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124. 4.     How long do you have to wait before changing your password
  1125.        again?  Why?
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131. 5.     What UNIX command is used to logout of the Multimax?
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138. 6.     What is the command to logout of the annex?
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144. COMPUTER EXERCISES
  1145.  
  1146. 7.     Login to the Multimax  
  1147.  
  1148.  
  1149.        a.     What did you notice when you entered the password?
  1150.  
  1151.  
  1152.  
  1153.  
  1154.        b.     Can you see the password as you enter it?
  1155.  
  1156.  
  1157.  
  1158.  
  1159.        c.     What happens if you make a mistake while entering the
  1160.               password?
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166. 8.     What do you see once you have logged in?  Write it here.
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175. 9.     Enter the command which displays the man pages for the man
  1176.        command.  (Don't forget to control output to the screen.) 
  1177.  
  1178.  
  1179.        The first section is titled "NAME," what are the titles of
  1180.        the other sections?
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189. 10.    What are the options for the man command?
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196. 11.    Enter the command to find out who (hint) is logged into the
  1197.        system.
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203. 12.    What command will give you more information about the
  1204.        current users?  Try it.
  1205.  
  1206.  
  1207.  
  1208. 13.    Logout of the Multimax and the Annex.
  1209.  
  1210. 2.  FILES
  1211.  
  1212.  
  1213. In UNIX, all data is organized in files.  An ordinary file is a
  1214. memo, source code program or shell script.  A shell script or
  1215. program source code can be viewed or edited from your terminal. 
  1216. Other files contain binary data, like programs for the kernel;
  1217. these files cannot be viewed or edited on the terminal.
  1218.  
  1219. Peripheral devices such as disks, tape drives, printers, and
  1220. terminals are also assigned file names.  Device files are
  1221. considered to be special files.  They have 'special'
  1222. characteristics.  Although input and output can be redirected to
  1223. and from a special file, do not attempt to display the contents
  1224. of a special file on your terminal.
  1225. 3.1  File Access Modes
  1226.  
  1227.  
  1228. File access modes are the protections that can be assigned to
  1229. files.  This protection can protect your files from unauthorized
  1230. reading or writing.  You can even protect your files from
  1231. yourself (you can prevent accidental deletion).
  1232.  
  1233. There are three access modes for files:
  1234.  
  1235.        r (read) read, examine, copy data in a file
  1236.  
  1237.        w (write) modify, delete a file
  1238.  
  1239.        x (execute) use the file as a command
  1240.  
  1241.  
  1242. Users with access to a file fall into one of three groups:
  1243.  
  1244.        u (user) the file's owner 
  1245.  
  1246.        g (group) users in the same group
  1247.  
  1248.        o (other) everybody else
  1249.  
  1250.  
  1251. The first output field of the ls -l command is a ten character
  1252. field.  Characters two through ten describe the file access
  1253. modes.  A typical access mode listing looks like:
  1254.  
  1255.                             rwxr-xr-x
  1256.  
  1257. Of the nine columns, the first three describe modes for the
  1258. file's owner, the next three for his group, and the last three
  1259. for everyone else.  Within each group of three, the first column
  1260. describes read access mode, the second write, and the third
  1261. execute.  A letter in a column indicates access granted, a dash
  1262. (-) indicates access denied.
  1263.  
  1264. Using the previous example, the user has r (read), w (write), and
  1265. x (execute) permissions.  Members of the user's logical group can
  1266. read (r) or execute (x).  Everyone else has read (r) and execute
  1267. (x)  permissions, too.  The effect of these permissions is that
  1268. the file's owner is the only one who can modify the file; but
  1269. everyone can examine, copy, or execute the file.
  1270. To change access modes on a file or directory, use the chmod
  1271. command.
  1272.  
  1273. ╔═══════════════════════════════════════════════════════════════╗
  1274. ║  Command Format:  chmod <access> <file1[filen]>               ║
  1275. ║                                                               ║
  1276. ║        access    - access permissions                         ║
  1277. ║     file1[filen] - one or more files to change permissions    ║
  1278. ╚═══════════════════════════════════════════════════════════════╝
  1279.  
  1280. Access can be expressed in either of two forms:
  1281.  
  1282.        -      with letters: [ugo] [+-=] [rwx]
  1283.  
  1284.        -      with numbers: [0-7] [0-7] [0-7]
  1285.  
  1286. Let's look at the method of changing the file permissions with
  1287. letters.  The letters u, g, and o represent user, group, and
  1288. others, respectively.  The + (plus) sign means to add the
  1289. permission and the - (minus) sign means to remove the permission.
  1290. The = (equal) sign means to set the permissions as shown.  Of
  1291. course, r,w, and x are read, write, and execute.
  1292.  
  1293. If, for illustration purposes, we created a file named file1 that
  1294. had the following permissions:
  1295.  
  1296.                      rw-rwxrwx
  1297.  
  1298. and you want to give yourself (user) execute permission and take
  1299. away others' (others' here means group and everyone else) write
  1300. permissions.
  1301.  
  1302.  
  1303. Sample Session:
  1304.  
  1305. ┌───────────────────────────────────────────────────────────────┐
  1306. │ $chmod u+x,g-w,o-w file1                                      │
  1307. │ $                                                             │
  1308. └───────────────────────────────────────────────────────────────┘
  1309.  
  1310. Now if we use the ls -la command, and look at the file
  1311. permissions for file1, they will look like this:
  1312.  
  1313.                      rwxr-xr-x
  1314. If you want to set several protections at once use the equal
  1315. sign.  The following example will set the permissions for the
  1316. user to read and execute.
  1317.  
  1318. Sample session:
  1319.  
  1320. ┌───────────────────────────────────────────────────────────────┐
  1321. │  $chmod u=rx file1                                            │
  1322. │  $                                                            │
  1323. └───────────────────────────────────────────────────────────────┘
  1324.  
  1325. The second method of changing the permissions is to use the octal
  1326. digits (0-7).  The octal digits 0 through 7 are represented in
  1327. binary in the following manner.
  1328.  
  1329.  
  1330.               Octal                Binary    Corresponds to permissions
  1331.  
  1332.                0                   000                  ---
  1333.                1                   001                  --x
  1334.                2                   010                  -w-
  1335.                3                   011                  -wx
  1336.                4                   100                  r--
  1337.                5                   101                  r-x
  1338.                6                   110                  rw-
  1339.                7                   111                  rwx
  1340.  
  1341.  
  1342. Notice that every time a one digit (1) occurs in the binary
  1343. number the corresponding permissions are also set.  Every time a
  1344. zero (0) occurs, the corresponding permission is denied.  So to
  1345. change the file permissions in the previous example, this is the
  1346. command to enter:
  1347.  
  1348.  
  1349. Sample Session:
  1350.  
  1351. ┌───────────────────────────────────────────────────────────────┐
  1352. │ $chmod 755 file1                                              │
  1353. │ $                                                             │
  1354. └───────────────────────────────────────────────────────────────┘
  1355.  
  1356. The first octal digit assigns user permissions of read, write and
  1357. execute.  The second digit assigns the group permission to read
  1358. and execute.  The last digit sets the others permission to read
  1359. and execute too.
  1360. 3.2  Listing Contents of Directories
  1361.  
  1362.  
  1363. The ls command is used to display file names and their
  1364. characteristics.  Since file names are stored in directories, ls
  1365. actually reads directory files.  Executing ls with no flags or
  1366. arguments simply lists the names of the files that exist in your
  1367. current working directory.  The initialization files will not be
  1368. listed.
  1369.  
  1370.  
  1371. ╔══════════════════════════════════════════════════════════════╗
  1372. ║   Command Format:  ls [options] [dir1[dirn]]                 ║
  1373. ║                                                              ║
  1374. ║    options - see man pages for a complete list               ║
  1375. ║                                                              ║
  1376. ║    dir1[dirn] - one or more directory names                  ║
  1377. ╚══════════════════════════════════════════════════════════════╝
  1378.  
  1379. The -a flag will cause the hidden (initialization) and all other
  1380. filenames to be displayed. 
  1381.  
  1382.  
  1383. The -C flag causes the output to be changed from single-column to
  1384. multi-column display. 
  1385.  
  1386.  
  1387. The -F flag adds a character to the end of each displayed
  1388. filename:
  1389.  
  1390.        /      indicates a directory
  1391.        *      indicates the file is executable.
  1392.    blank      indicates a plain or ordinary file
  1393.  
  1394.  
  1395. The -l flag causes detailed information to be printed for files
  1396. in the directory.  This information includes:
  1397.  
  1398.        file type (directory, block special, character special,
  1399.                 fifo special, symbolic link, or ordinary file)
  1400.        access modes
  1401.        number of links
  1402.        ownership  
  1403.      group affiliation
  1404.        size in bytes
  1405.        date and time of last modification
  1406.        filename
  1407. Without a filename argument, ls displays information about the
  1408. current working directory.  The output is automatically sorted
  1409. alphabetically by default. 
  1410.  
  1411.  
  1412. Example:
  1413.  
  1414. .................................................................
  1415. . $ls                                                           .
  1416. .................................................................
  1417.  
  1418. The following example provides a long listing of the current
  1419. working directory.
  1420.  
  1421. Example:
  1422.  
  1423. .................................................................
  1424. . $ls -l                                                        .
  1425. .................................................................
  1426.  
  1427.  
  1428. This example shows the ls command with no arguments so it uses
  1429. the default, the current working directory.  The argument could
  1430. be a relative or absolute directory name.
  1431.  
  1432. Sample session:
  1433.  
  1434. ┌───────────────────────────────────────────────────────────────┐
  1435. │ $ls -la                                                       │
  1436. │ total 975                                                     │
  1437. │ drwxrwxr-x  4 teacher   class   2048  Jul 16 17.56 .          │
  1438. │ drwxr-xr-x 60 root              1536  Jul 13 14:18 ..         │
  1439. │ -rwx------  1 teacher   class   4210  May  1 08:27 .profile   │
  1440. │ -rwxr-xr-x  1 teacher   class   1948  May 12 13:42 memo       │
  1441. │ $                                                             │
  1442. └───────────────────────────────────────────────────────────────┘
  1443.  
  1444. 3.3 File Classifications
  1445.  
  1446.  
  1447. The file command will classify files according to their contents.
  1448.  
  1449. ╔═══════════════════════════════════════════════════════════════╗
  1450. ║  Command Format:  file [options] <file1[filen]>               ║
  1451. ║                                                               ║
  1452. ║    file1[filen] - one or more filenames to analyze            ║
  1453. ╚═══════════════════════════════════════════════════════════════╝
  1454.  
  1455.  A few of the classifications that the file command displays are
  1456. shown below.  The results of using the file command are not
  1457. always correct.
  1458.  
  1459.        English text
  1460.        ascii text
  1461.        c program text
  1462.        cannot stat
  1463.        commands text
  1464.        data
  1465.        directory
  1466.        empty
  1467.        executable
  1468.  
  1469. Sample Session:
  1470.  
  1471. ┌───────────────────────────────────────────────────────────────┐
  1472. │ $file speople                                                 │
  1473. │ speople:                  commands text                       │
  1474. │ $file test                                                    │
  1475. │ test:                     directory                           │
  1476. │ $file mail                                                    │
  1477. │ mail:                     data                                │
  1478. │ $                                                             │
  1479. └───────────────────────────────────────────────────────────────┘
  1480.  
  1481.  
  1482. By convention, files beginning with a dot (.) are called
  1483. initialization files or 'hidden files'.  These files describe
  1484. your environment to the shell. They are sometimes called 'dot
  1485. files'. 
  1486.  
  1487. By convention, files that end with:
  1488.               
  1489.                 .c   are C source code programs
  1490.                 .f   are Fortran source code programs
  1491.                 .o   are object programs
  1492.                 .a   are archive files
  1493. 3.4  Displaying Files
  1494.  
  1495.  
  1496. The cat command displays the contents of a file.  The command cat
  1497. is an abbreviation for catenate. This command will read each file
  1498. in sequence and write it to the monitor screen. 
  1499.  
  1500. ╔═══════════════════════════════════════════════════════════════╗
  1501. ║  Command Format:  cat [options] [file1[filen]]                ║
  1502. ║                                                               ║
  1503. ║    options - see man pages for a complete list                ║
  1504. ║                                                               ║
  1505. ║    file1[filen] - one or more file names                      ║ 
  1506. ╚═══════════════════════════════════════════════════════════════╝
  1507.  
  1508.  
  1509. If no filename is given, or the argument - is encountered, cat
  1510. reads from standard input.
  1511.  
  1512. Sample session:
  1513.  
  1514. .................................................................
  1515. .   $cat                                                        .
  1516. .................................................................
  1517.  
  1518. This is the simpliest example but not very exciting.  The cat
  1519. command will get its input from the keyboard.  Everything that is
  1520. typed will be displayed on the monitor.
  1521.  
  1522. If an argument is given to the cat command that file will be
  1523. displayed on the monitor.
  1524.  
  1525. Sample session: 
  1526.  
  1527. ┌───────────────────────────────────────────────────────────────┐
  1528. │   $cat main.c                                                 │
  1529. │   main ()                                                     │
  1530. │   {                                                           │
  1531. │         printf ("hello from main!\n\n");                        │
  1532. │         printf ("calling function1!\n\n");                      │
  1533. │       funct1();                                               │
  1534. │       printf ("back from function1!\n\n");                    │
  1535. │         printf ("calling function2!\n\n");                      │
  1536. │         funct2();                                               │
  1537. │         printf ("that's it!\n\n");                              │
  1538. │   }                                                           │
  1539. │   $                                                           │ 
  1540. └───────────────────────────────────────────────────────────────┘
  1541. Several files can be displayed on the monitor one after the other
  1542. by separating the filenames with a space.
  1543.  
  1544. Sample session:
  1545.  
  1546. ┌───────────────────────────────────────────────────────────────┐
  1547. │    $cat main.c main.f                                         │
  1548. │    main ()                                                    │
  1549. │    {                                                          │
  1550. │           printf ("hello from main!\n\n");                      │
  1551. │           printf ("calling function1!\n\n");                    │
  1552. │           funct1();                                             │
  1553. │           printf ("back from function1!\n\n");                  │
  1554. │           printf ("calling function2!\n\n");                    │
  1555. │           funct2();                                             │
  1556. │           printf ("that's it!\n\n");                            │
  1557. │     }                                                         │ 
  1558. │             program calling                                   │ 
  1559. │         write(6,100)                                          │
  1560. │     100     format('Hello from main!',/)                          │
  1561. │           write(6,110)                                          │
  1562. │     110     format(' Calling subroutine1!',/)                     │
  1563. │             call sub1                                             │
  1564. │           write(6,120)                                          │
  1565. │     120     format(t15' Back from subroutine1!',/)                │
  1566. │           write(6,130)                                          │
  1567. │     130     format(' Calling subroutine2!',/)                     │
  1568. │           call sub2                                             │
  1569. │           write(6,140)                                          │
  1570. │     140     format(t15' Back from subroutine2!',/)                │
  1571. │           write(6,150)                                          │
  1572. │     150     format(' Thats all, folks!')                          │
  1573. │           end                                                   │
  1574. │     $                                                         │
  1575. └───────────────────────────────────────────────────────────────┘
  1576.  
  1577. If the file contains more lines than can be displayed on the
  1578. screen the display will continue to scroll until the last line
  1579. has been displayed then the prompt will be redisplayed.  This can
  1580. be a problem if you intend to read the text.  Be prepared to stop
  1581. the screen so it can be read.
  1582. The pg command displays the contents of a file one screen at a
  1583. time.  It allows the user to perform string searches and to
  1584. scroll backwards.
  1585.  
  1586. ╔═══════════════════════════════════════════════════════════════╗
  1587. ║  Command Format:  pg [options] [file1[filen]]                 ║
  1588. ║                                                               ║
  1589. ║    options - see man pages for a complete list                ║
  1590. ║                                                               ║
  1591. ║    file1[filen] - one or more files to paginate               ║
  1592. ║                                                               ║
  1593. ╚═══════════════════════════════════════════════════════════════╝
  1594.                                                                  
  1595.                                                                  
  1596. Sample session:
  1597.                                                                               
  1598. ┌────────────────────────────────────────────────────────────────────────────┐
  1599. │                                                                            │
  1600. │   $pg memo                                                                 │
  1601. │   What's Happening                                                         │
  1602. │   by Pam Hajny                                                             │
  1603. │   Denver Office                                                            │
  1604. │                                                                            │
  1605. │   With IRM Training:                                                       │
  1606. │                                                                            │
  1607. .   A Reclamation-wide workshop was held in early October to                 .
  1608. .                                                                            .
  1609. .                                                                            .
  1610.                                                                              
  1611. │   three groups; CYBER, VAX, and other (PC/LAN, scientific,                 │
  1612. │   :                                                                        │
  1613. │                                                                            │
  1614. └────────────────────────────────────────────────────────────────────────────┘
  1615.  
  1616. Twenty three lines of the file will appear and the : (colon)
  1617. prompt will appear on the last line.  To have the next twenty
  1618. three line of the file appear, simply press (Ret).  If you don't
  1619. want to see anymore of the file, enter a q (for quit) and the
  1620. shell prompt will be redisplayed.
  1621. The following UNIX command is useful for viewing the end of a
  1622. file without having to display the entire file.
  1623.                     
  1624. ╔═══════════════════════════════════════════════════════════════╗
  1625. ║  Command Format:  tail [options] [file1]                      ║
  1626. ║                                                               ║
  1627. ║      options - see man pages for a complete list                ║
  1628. ║                                                               ║
  1629. ║    file1 - the file to display, if none is given use          ║
  1630. ║            standard input                                     ║
  1631. ╚═══════════════════════════════════════════════════════════════╝
  1632.  
  1633. The tail command displays the last 10 lines of file  by default. 
  1634. The tail command accepts a -N flag to display the last N lines.
  1635.  
  1636.  
  1637. Sample Session:
  1638.  
  1639. ┌────────────────────────────────────────────────────────────────────────────┐
  1640. │ $tail memo                                                                 │
  1641. │ data communication between the ASC IBM and other Reclamation computers.    │
  1642. │ Asynchronous communication can be accomplished with the same terminals     │
  1643. │ we use for other computer tasks, over the same lines and through the MICOM │
  1644. │ port selectors.  Currently, host-to-host communications is accomplished    │
  1645. │ over a line between the IBM and the CYBERs.  The software that supports    │
  1646. │ this communication is called NJEF.  Although the capability has been there │
  1647. │ for some time, we have recently been working with ASC personnel to         │
  1648. │ improve its reliability and accessibility.  For CYBER users, there is      │
  1649. │ an NJEF Users' Guide available which can be requested through the Hotline  │
  1650. │ (303) 236-4567.                                                            │
  1651. │ $                                                                          │
  1652. └────────────────────────────────────────────────────────────────────────────┘
  1653. 3.5  Removing Files
  1654.  
  1655.  
  1656. The rm command will remove the entries for one or more files from
  1657. a directory.  If an entry was the last link to the file, the file
  1658. will be destroyed.  Removal of a file requires write permission
  1659. to the directory itself, but neither read nor write permission to
  1660. the file itself.  The format for the rm command is:
  1661.           
  1662. ╔══════════════════════════════════════════════════════════════╗
  1663. ║    Command Format:  rm [options] <file1[filen]>              ║ 
  1664. ║                                                              ║ 
  1665. ║    options - see man pages for a complete list               ║
  1666. ║                                                              ║
  1667. ║    file1[filen] - one or more files to remove                ║ 
  1668. ╚══════════════════════════════════════════════════════════════╝ 
  1669.                                                                  
  1670.                                                                
  1671. Sample session:
  1672.  
  1673. ┌───────────────────────────────────────────────────────────────┐
  1674. │ $ls                                                           │
  1675. │ memo                                                          │
  1676. │ tdata                                                         │
  1677. │ subdir                                                        │
  1678. │ $rm memo                                                      │
  1679. │ $ls                                                           │
  1680. │ tdata                                                         │
  1681. │ subdir                                                        │
  1682. │ $                                                             │
  1683. └───────────────────────────────────────────────────────────────┘
  1684.  
  1685. The file memo has been deleted from the current working
  1686. directory. 
  1687. Multiple files can be deleted by separating the filenames with a 
  1688. space.
  1689.  
  1690. Sample session:
  1691.  
  1692. ┌───────────────────────────────────────────────────────────────┐
  1693. │ $ls                                                           │
  1694. │ memo                                                          │
  1695. │ tdata                                                         │
  1696. │ subdir                                                        │
  1697. │ $rm memo tdata                                                │
  1698. │ $ls                                                           │
  1699. │ subdir                                                        │
  1700. │ $                                                             │
  1701. └───────────────────────────────────────────────────────────────┘
  1702. 3.6  Printing Files
  1703.  
  1704.  
  1705. The lp command routes a file to a printer.
  1706.  
  1707. ╔═══════════════════════════════════════════════════════════════╗
  1708. ║  Command Format:  lp [-d<dest>] [-n<number>] [file1[filen]]   ║
  1709. ║                                                               ║
  1710. ║     dest    - destination (default set by administrator)      ║
  1711. ║                                                               ║
  1712. ║     number  - number of copies (default is 1)                 ║
  1713. ║                                                               ║
  1714. ║     file1[filen] - one or more files to be printed            ║
  1715. ╚═══════════════════════════════════════════════════════════════╝
  1716.  
  1717. If no file name is mentioned the standard input is assumed.  The
  1718. filename dash (-) stands for standard input and may be supplied
  1719. in conjunction with named files.  The order in which the
  1720. filenames appear is the order in which they will be printed.
  1721.        
  1722. The printers in Denver have the following destination names:
  1723.  
  1724.        Mannesman 910 laser printer - mtlzr
  1725.  
  1726.        Mannesman 600 line printer  - mt_600  (Denver default)
  1727.  
  1728. If no specific printer is given the default printer will be
  1729. selected. The following example will print one copy (default) of
  1730. the file called test_285 to the line printer (default).
  1731.  
  1732. Sample session:
  1733.  
  1734. ┌───────────────────────────────────────────────────────────────┐
  1735. │   $lp test_285                                                │
  1736. │   request id is mt_600-1271 (1 file)                          │
  1737. │   $                                                           │
  1738. └───────────────────────────────────────────────────────────────┘
  1739.  
  1740. It is possible to specify the printer as shown in the following
  1741. example. In this case, we specified the default printer.
  1742.  
  1743. Sample Session:
  1744.  
  1745. ┌───────────────────────────────────────────────────────────────┐
  1746. │ $lp -dmt_600 test_286                                         │
  1747. │ request id is mt_600-1272 (1 file)                            │
  1748. │ $                                                             │
  1749. └───────────────────────────────────────────────────────────────┘
  1750.  
  1751.  
  1752.  
  1753.  
  1754. To print two copies of a file called test_287 on the laser
  1755. printer in Building 53 in Denver, enter the following command:
  1756.  
  1757. Sample Session:
  1758.  
  1759. ┌───────────────────────────────────────────────────────────────┐
  1760. │ $lp -dmtlzr -n2 test_287                                      │
  1761. │ request id is mtlzr-1273 (1 file)                             │
  1762. │ $                                                             │
  1763. └───────────────────────────────────────────────────────────────┘
  1764. 3.7  Print Status
  1765.  
  1766.  
  1767. The lpstat command will print information about the current
  1768. status of the printer system.
  1769.  
  1770. ╔═══════════════════════════════════════════════════════════════╗
  1771. ║  Command Format:  lpstat [options]                            ║
  1772. ║                                                               ║
  1773. ║    options - see man pages for a complete list                ║
  1774. ║                                                               ║
  1775. ╚═══════════════════════════════════════════════════════════════╝
  1776.                                                                  
  1777. If no options are given, the lpstat command will print the status
  1778. of all requests made to lp by the user.
  1779.  
  1780.  
  1781. Sample Session:
  1782.  
  1783. ┌───────────────────────────────────────────────────────────────┐
  1784. │ $lpstat                                                       │
  1785. │ mtlzr-1274    teacher     22560    Jul 16 09:05 on mtlzr      │
  1786. │ $                                                             │
  1787. └───────────────────────────────────────────────────────────────┘
  1788.  
  1789. The first field is the remote id of the print job.  The username
  1790. is next and the size (in bytes) of the print file.  The date and
  1791. time are next and finally the name of the printer.
  1792.  
  1793. One of the options available is -t.  This option will print all
  1794. of the printer status information.
  1795.  
  1796.  
  1797. Sample Session:
  1798.  
  1799. ┌───────────────────────────────────────────────────────────────┐
  1800. │ $lpstat -t                                                    │
  1801. │ scheduler is running                                          │
  1802. │ system default destination: mt_600                            │
  1803. │ device for mt_600: /dev/rlp000                                │
  1804. │ device for mtlzr: /dev/rt0002                                 │
  1805. │ mt_600 accepting requests since Sep 19 16:09                  │
  1806. │ mtlzr accepting requests since Sep 19 16:43                   │
  1807. │ printer mt_600 is idle. enabled since Jul 3 16:52             │
  1808. │ printer mtlzr is idle. enabled since Jul 3 16:51              │
  1809. │ $                                                             │
  1810. └───────────────────────────────────────────────────────────────┘
  1811.  
  1812. This is an example of the kinds of information available from the
  1813. lpstat command.
  1814. 3.8  Canceling Print Jobs
  1815.  
  1816.  
  1817. The cancel command will cancel printer requests made by the lp
  1818. command.  The command line arguments can be either request id's
  1819. (these are returned by the lp command) or the printer name.  If
  1820. you specify the request id, the cancel command will stop the job
  1821. even if it is currently printing.  If you specify the printer
  1822. name, the job currently being printed will be canceled.  In
  1823. either case, the cancellation of a request that is currently
  1824. printing will free the printer to print the next request.
  1825.  
  1826.  
  1827. ╔═══════════════════════════════════════════════════════════════╗
  1828. ║     Command Format:     cancel <[ids] [printer]>              ║
  1829. ║                                                               ║
  1830. ║      ids - request ids (returned by lp command)               ║
  1831. ║                                                               ║
  1832. ║      printer - printer name                                   ║
  1833. ╚═══════════════════════════════════════════════════════════════╝
  1834.  
  1835.  
  1836. Sample Session:
  1837.  
  1838. ┌───────────────────────────────────────────────────────────────┐
  1839. │ $lp -dmt_600 contest                                          │
  1840. │ request id is mt_600-1280 (1 file)                            │
  1841. │ $cancel mt_600-1280                                           │
  1842. │ request "mt_600-1280" canceled                                │
  1843. │ $                                                             │
  1844. └───────────────────────────────────────────────────────────────┘
  1845. 3.9  Copying Files
  1846.  
  1847.  
  1848. A user may make a copy of a file if he has read access to that
  1849. file.  The cp command can be used to copy the contents of one
  1850. file to another.
  1851.  
  1852. ╔═══════════════════════════════════════════════════════════════╗
  1853. ║  Command Format:  cp <file1[filen]> <target>                  ║
  1854. ║                                                               ║
  1855. ║    file1[filen] - one or more source files                    ║
  1856. ║                                                               ║
  1857. ║    target       - file or dirname                             ║
  1858. ║                                                               ║
  1859. ║                  file1 and target cannot be the same and      ║
  1860. ║                  if the target is a file its' contents are    ║
  1861. ║                  destroyed.                                   ║
  1862. ║                                                               ║
  1863. ║                  If target is a directory, then the contents  ║
  1864. ║                  of the source file(s) is copied to that      ║ 
  1865. ║                  directory.                                   ║ 
  1866. ║                                                               ║
  1867. ╚═══════════════════════════════════════════════════════════════╝
  1868.  
  1869. Sample Session:
  1870.  
  1871. ┌───────────────────────────────────────────────────────────────┐
  1872. │ $cp contest memo                                              │
  1873. │ $                                                             │
  1874. └───────────────────────────────────────────────────────────────┘
  1875.  
  1876. This will cause a copy of the file contest to be made into a file
  1877. named memo.  If memo doesn't exist, it will be created.  If it
  1878. already exists, it will be written over.  The cp command is
  1879. nondestructive; that means that the source file will remain
  1880. intact.
  1881.  
  1882. The cp command can also be used to copy several files into
  1883. another directory.
  1884.  
  1885.  
  1886. Sample Session:
  1887.  
  1888. ┌───────────────────────────────────────────────────────────────┐
  1889. │ $cp file1 file2 /user0/teacher                                │
  1890. │ $                                                             │
  1891. └───────────────────────────────────────────────────────────────┘
  1892.  
  1893. A copy of file1 and file2 has been sent to the directory (in this
  1894. case, the target directory) /user0/teacher.  The user of cp will
  1895. own the newly copied files.
  1896. 3.10  Moving Files
  1897.  
  1898.  
  1899. A user may move a file only if he has write access to that file. 
  1900. The mv (move) command can be used to rename one file.
  1901.  
  1902.  
  1903. ╔═══════════════════════════════════════════════════════════════╗
  1904. ║  Command Format:  mv <file1[filen]> <target>                  ║
  1905. ║                                                               ║
  1906. ║    file1[filen] - one or more source files                    ║
  1907. ║                                                               ║
  1908. ║    target       - file or dirname                             ║
  1909. ║                                                               ║
  1910. ║                  file1 and target cannot be the same and      ║
  1911. ║                  if the target is a file its' contents are    ║
  1912. ║                  destroyed.                                   ║
  1913. ║                                                               ║
  1914. ║                  If target is a directory, then the contents  ║
  1915. ║                  of the source file(s) are moved to that      ║ 
  1916. ║                  directory.                                   ║ 
  1917. ║                                                               ║
  1918. ╚═══════════════════════════════════════════════════════════════╝
  1919.                                                                  
  1920.  
  1921. Sample Session:
  1922.  
  1923. ┌───────────────────────────────────────────────────────────────┐
  1924. │ $mv contest memo                                              │
  1925. │ $                                                             │
  1926. └───────────────────────────────────────────────────────────────┘
  1927.  
  1928. This will have the effect of changing the name of the file
  1929. contest into memo.  The permissions on the file will remain the
  1930. same.  The move command is destructive.  That means the source
  1931. file no longer exists.
  1932.  
  1933. The mv command can also be use to move files from one directory
  1934. to another.
  1935.  
  1936. Sample Session:
  1937.  
  1938. ┌───────────────────────────────────────────────────────────────┐
  1939. │ $mv file1 file2 /user0/teacher                                │
  1940. │ $                                                             │
  1941. └───────────────────────────────────────────────────────────────┘
  1942.  
  1943. The files, file1 and file2, have been sent to the directory
  1944. /user0/teacher.  They have been "moved" and no longer reside in
  1945. the current directory.  The owner remains the same when a file is
  1946. moved.
  1947. Workshop 3
  1948.  
  1949. This workshop will reinforce your understanding of the topics
  1950. presented in this chapter.  Login to the Multimax using the
  1951. username and password given to you by the instructor.  Each
  1952. student should complete the entire workshop.  You might need to
  1953. work in a team on the computer exercises.
  1954.  
  1955. DESK EXERCISES
  1956.  
  1957.  
  1958. 1.     List four types of files.
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965. 2.     What does the file command do?
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972. 3.     The ls command will display the contents of the current
  1973.        working directory.  What does the -F option do?
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979. 4.     What command is used to display the contents of an ordinary
  1980.        file?
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986. 5.     What command would you use to append one file to the end of
  1987.        another?
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993. 6.     What is the lp command?
  1994.  
  1995.  
  1996.  
  1997.  
  1998.                                   Continue on the next page
  1999. 7.     How can you find out the status of your print job?
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005. 8.     What command would you enter to cancel a print job called
  2006.        mt_600-1131?
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012. 9.     What command will copy the contents of one file to another?
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018. 10.    What does mv do?
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024. 11.    What do the following file protections indicate?
  2025.  
  2026.               rwx------
  2027.  
  2028.  
  2029.  
  2030.               rwxr-xr-x
  2031.  
  2032.  
  2033.  
  2034.               ---------
  2035.  
  2036.  
  2037.               rwxr--r--
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.                                   Continue on the next page
  2051. COMPUTER EXERCISES
  2052.  
  2053.  
  2054. 12.    Log into the Multimax.
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060. 13.    Execute the file command on the files listed below.  Record
  2061.        the output in the space provided.
  2062.  
  2063.  
  2064.        a.     .profile
  2065.  
  2066.  
  2067.  
  2068.        b.     /bin/vax
  2069.  
  2070.  
  2071.  
  2072.        c.     /dev/console
  2073.  
  2074.  
  2075.  
  2076.  
  2077. 14.    Which of the above files is readable?
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084. 15.    Enter the command to display the contents of the current
  2085.        working directory.  Hint: ls
  2086.  
  2087.  
  2088.        a.     How many files are listed?
  2089.  
  2090.  
  2091.  
  2092.        b.     Type ls -a
  2093.  
  2094.  
  2095.  
  2096.        c.     How many entries are listed?
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.                                   Continue on the next page
  2103.        d.     Which entries were not listed in your original output
  2104.               of ls?
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112. 16.    How does the output of ls -a and ls -Ac differ? 
  2113.        Try it.
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120. 17.    How many fields are displayed for each entry when you
  2121.        execute ls -l? What are the fields?
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127. 18.    What are the current permissions on .profile?
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133. 19.    Change permissions on .profile so that no one (including
  2134.        you) has any access to the file.  
  2135.        (Hint: Use the chmod command)
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141. 20.    Without changing the permissions, list the contents of the
  2142.        file named .profile to the screen.
  2143.        What happened?  Why?
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.                                   Continue on the next page
  2155. 21.    Change the permissions on .profile to 
  2156.  
  2157.               u - read, write, execute
  2158.               g - read
  2159.               o - read             
  2160.  
  2161.  
  2162.  
  2163.  
  2164. 22.    Type cat .profile.  What happened?  Do you know why?
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171. 23.    Enter pg memo.  What does this command do?
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179. 24.    Send one copy of the file called memo to the laser printer.
  2180.      
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186. 25.    Logout of the Multimax and the Annex.
  2187.                                             NOTES
  2188. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2189. 4.  DIRECTORIES
  2190.  
  2191.  
  2192. A directory is a file whose sole job is to store file names and
  2193. related information.  All files, whether ordinary, special, or
  2194. directory, are contained in directories.
  2195.  
  2196. The directory in which you find yourself when you first login is
  2197. called your home directory.  You will be doing much of your work
  2198. in your home directory and subdirectories that you'll be creating
  2199. to organize your files.
  2200.  
  2201.  
  2202.  
  2203. 4.1  Absolute/Relative Pathnames
  2204.  
  2205.  
  2206. As we saw earlier, directories are arranged in a hierarchy with
  2207. root (/) at the top.  The position of any file within the
  2208. hierarchy is described by its pathname.  Elements of a pathname
  2209. are separated by a /.  A pathname is absolute if it is described
  2210. in relation to root, so absolute pathnames always begin with a /.
  2211. These are some example of absolute filenames.
  2212.  
  2213.               /etc/passwd
  2214.               /users/sjones/chem/notes
  2215.               /dev/rdsk/Os3
  2216.  
  2217. A pathname can also be relative to your current working
  2218. directory.  Relative pathnames never begin with /.  Relative to
  2219. user sjones' home directory, some pathnames might look like this:
  2220.                                                                  
  2221.               chem/notes
  2222.               personal/res
  2223.  
  2224. To determine where you are within the filesystem hierarchy at any
  2225. time, enter the command to print the current working directory.
  2226.  
  2227. ╔═══════════════════════════════════════════════════════════════╗
  2228. ║  Command Format:  pwd                                         ║
  2229. ╚═══════════════════════════════════════════════════════════════╝
  2230.  
  2231. Sample Session:
  2232.  
  2233. ┌───────────────────────────────────────────────────────────────┐
  2234. │ $pwd                                                          │
  2235. │ /user0/teacher                                                │
  2236. │ $                                                             │
  2237. └───────────────────────────────────────────────────────────────┘
  2238.  
  2239. Notice that this is an absolute pathname.  This is the pathname
  2240. of the current working directory.
  2241. 4.2  Creating Directories
  2242.  
  2243.  
  2244. Directories are created by the following command:
  2245.  
  2246. ╔═══════════════════════════════════════════════════════════════╗
  2247. ║  Command Format:  mkdir [options] <dirname>                   ║
  2248. ║                                                               ║
  2249. ║      options - see man pages for a complete list              ║
  2250. ║                                                               ║
  2251. ║      dirname -  name of the new directory (absolute or        ║
  2252. ║                    relative pathname).                        ║ 
  2253. ╚═══════════════════════════════════════════════════════════════╝
  2254.                                                                  
  2255. If the option to change permission mode is not given, the
  2256. directory will have default permissions set to read,write,execute
  2257. for the user and read and execute for group and others.  The
  2258. files . (dot) and .. (dot dot) are created automatically.  In
  2259. order to create a sub-directory, you must have write permission
  2260. on the parent directory.  The owner id and the group id are set
  2261. to the real users id and group id, respectively.
  2262.  
  2263. 4.3  Removing Directories
  2264.  
  2265.  
  2266. Directories can be deleted using the rmdir command.
  2267.  
  2268. ╔═══════════════════════════════════════════════════════════════╗
  2269. ║  Command Format:  rmdir  [options]  <dirname>                 ║
  2270. ║                                                               ║
  2271. ║    options - see man pages for a complete list                ║
  2272. ║                                                               ║
  2273. ║    dirname - the directory to remove, it must be empty.       ║
  2274. ║                                                               ║
  2275. ╚═══════════════════════════════════════════════════════════════╝
  2276.  
  2277. Sample Session:
  2278.  
  2279. ┌───────────────────────────────────────────────────────────────┐
  2280. │ $pwd                                                          │
  2281. │ /user0/teacher                                                │
  2282. │ $ls -la                                                       │
  2283. │ total 5                                                       │
  2284. │ drwxr-xr-x 2 teacher  class   512  Jul 18 08:12 .             │
  2285. │ drwxrwxr-x 5 root     root    2048 Jul  1 13:14 ..            │
  2286. │ $rmdir teacher                                                │
  2287. │ rmdir:teacher:Directory does not exist                        │
  2288. │ $                                                             │
  2289. └───────────────────────────────────────────────────────────────┘
  2290.  
  2291.  
  2292. Normally, directories are deleted using the rmdir command. 
  2293. Before the directory can be removed, it must be empty; that is,
  2294. it must not contain any files.  Notice that in the above example
  2295. two files are present, . (dot) and .. (dot).  Remember, these
  2296. refer to the current working directory and its parent.  They
  2297. cannot be removed.
  2298. Sample Session:
  2299.  
  2300. ┌───────────────────────────────────────────────────────────────┐
  2301. │ $rmdir .                                                      │
  2302. │ rmdir: .: Can't remove current directory or ..                │
  2303. │ $                                                             │
  2304. └───────────────────────────────────────────────────────────────┘
  2305.  
  2306. For the purposes of deleting a directory, the directory is empty
  2307. if it contains only two files, namely . (dot) and .. (dot dot).
  2308. 4.4  Changing Directories
  2309.  
  2310.  
  2311. To "move around" in the filesystem, use the cd (change directory)
  2312. command.
  2313.  
  2314. ╔═══════════════════════════════════════════════════════════════╗
  2315. ║  Command Format:  cd [dirname]                                ║
  2316. ║                                                               ║
  2317. ║  dirname  -    If not specified, the value of the $HOME       ║
  2318. ║                shell variable will be used as the new         ║
  2319. ║                current working directory.                     ║
  2320. ║                                                               ║
  2321. ║                If the directory given is an absolute pathname ║
  2322. ║                that directory is the new current working      ║
  2323. ║                directory.  A relative pathname can also be    ║
  2324. ║                given.                                         ║
  2325. ╚═══════════════════════════════════════════════════════════════╝
  2326.  
  2327.  
  2328. Sample Session:
  2329.  
  2330. ┌───────────────────────────────────────────────────────────────┐
  2331. │ $cd /user0/teacher                                            │
  2332. │ $pwd                                                          │
  2333. │ /user0/teacher                                                │
  2334. │ $                                                             │
  2335. └───────────────────────────────────────────────────────────────┘
  2336.  
  2337. The current working directory is now /user0/teacher.
  2338.  
  2339.  
  2340. Sample Session:
  2341.  
  2342. ┌───────────────────────────────────────────────────────────────┐
  2343. │ $cd memos                                                     │
  2344. │ $pwd                                                          │
  2345. │ /user0/teacher/memos                                          │
  2346. │ $                                                             │
  2347. └───────────────────────────────────────────────────────────────┘
  2348.  
  2349. This command will look for a subdirectory called memos under the
  2350. current working directory.  If it is found, it will become the
  2351. new working directory; otherwise, an error will occur.
  2352.  
  2353. Error messages beginning with "cannot access file..." often
  2354. indicate that the pathname is incorrect or misspelled.
  2355. 4.5  Renaming Directories
  2356.  
  2357.  
  2358. The mv (move) command can also be used to rename a directory.
  2359.  
  2360. ╔═══════════════════════════════════════════════════════════════╗
  2361. ║  Command Format:  mv <dirname> <target>                       ║
  2362. ║                                                               ║
  2363. ║    dirname   - name of the source directory                   ║
  2364. ║    target    - target directory name                          ║
  2365. ╚═══════════════════════════════════════════════════════════════╝
  2366.  
  2367.  
  2368. Sample Session:
  2369.  
  2370. ┌───────────────────────────────────────────────────────────────┐
  2371. │ $mv users newusers                                            │
  2372. │ $                                                             │
  2373. └───────────────────────────────────────────────────────────────┘
  2374.  
  2375.  
  2376. This will have the effect of changing the name of the directory
  2377. users into newusers.  The permissions on the directory will
  2378. remain the same.
  2379.  
  2380.  
  2381. NOTE:         All files and subdirectories in the directory newusers
  2382.               now have new absolute pathnames. 
  2383. 4.6  The directories . (dot) and .. (dot dot)  
  2384.  
  2385.  
  2386. The filename . (dot) represents the current working directory;
  2387. and the filename .. (dot dot) represent the directory one level
  2388. above the current working directory, often referred to as the
  2389. parent directory.  If we enter the command to show a listing of
  2390. the current working directories files and use the -a option to
  2391. list all the files and the -l option provides the long listing,
  2392. this is the result.
  2393.  
  2394.                
  2395. Sample Session:
  2396.  
  2397. ┌───────────────────────────────────────────────────────────────┐
  2398. │ $ls -la                                                       │
  2399. │ total 975                                                     │
  2400. │ drwxrwxr-x  4 teacher   class   2048  Jul 16 17.56 .          │
  2401. │ drwxr-xr-x 60 root              1536  Jul 13 14:18 ..         │
  2402. │ ----------  1 teacher   class   4210  May  1 08:27 .profile   │
  2403. │ -rwxr-xr-x  1 teacher   class   1948  May 12 13:42 memo       │
  2404. │ $                                                             │
  2405. └───────────────────────────────────────────────────────────────┘
  2406.                                                                  
  2407. The ls -la command displays access modes, number of links, the
  2408. owner, the group, size, etc. of files in a directory; but also
  2409. displays the characteristics of the current working directory and
  2410. its parent.  The first entry is the entry for the current
  2411. directory.  The owner is teacher and the group is class.  The
  2412. second entry is the parent directory.  It is one level up from
  2413. the current working directory.  It is owned by the root
  2414. directory.
  2415.  
  2416. Instead of asking for information on all of the files in a
  2417. directory, you can request just the information on the current
  2418. working directory.
  2419.  
  2420.  
  2421. Sample Session:
  2422.  
  2423. ┌───────────────────────────────────────────────────────────────┐
  2424. │ $ls -ld                                                       │
  2425. │ drwxrwxr-x  4  teacher   class  2048 Jul 16 17:56 .           │
  2426. │ $                                                             │
  2427. └───────────────────────────────────────────────────────────────┘
  2428.  
  2429. The response from the command simply shows the long information
  2430. for the current working directory . (dot).
  2431. Information can also be obtained for the parent of the current
  2432. working directory by using its name as an argument.
  2433.  
  2434.  
  2435. Sample Session:
  2436.  
  2437. ┌───────────────────────────────────────────────────────────────┐
  2438. │ $ls -ld ..                                                    │
  2439. │ drwxr-xr-x  60  root  root  1536  Jul 13 14:18 ..             │
  2440. │ $                                                             │
  2441. └───────────────────────────────────────────────────────────────┘
  2442.  
  2443. Here's the long list of the current working directories parent.
  2444. (.. is the shorthand representation of the current working
  2445. directories parent) 
  2446.                                                                  
  2447. Both of the directory names . (dot) and .. (dot dot) can be used
  2448. as arguments to commands.  To change the parent of the current
  2449. working directory into the current working directory, the command
  2450. is:                                                              
  2451.  
  2452.  
  2453. Sample Session:
  2454.  
  2455. ┌───────────────────────────────────────────────────────────────┐
  2456. │ $pwd                                                          │
  2457. │ /user0/teacher                                                │
  2458. │ $cd ..                                                        │
  2459. │ $pwd                                                          │
  2460. │ /user0                                                        │
  2461. │ $                                                             │
  2462. └───────────────────────────────────────────────────────────────┘
  2463.  
  2464. The current working directory is the former parent.
  2465.  
  2466. This is all very interesting but what good is it?  You can
  2467. specify the current working directory or its parent without
  2468. typing the entire absolute pathname.  It can also be handy when
  2469. giving arguments to UNIX commands.  
  2470.  
  2471. Why are the pathnames sjones/chem and ./sjones/chem equivalent?
  2472. 4.7  Directory Access Modes
  2473.  
  2474.  
  2475. Directory access modes are listed and organized in the same
  2476. manner as any other file.  There are a few differences that need
  2477. to be mentioned.
  2478.  
  2479.  
  2480.  
  2481. 4.7.1  Read
  2482.  
  2483.  
  2484. Access to a directory means that the user can read the contents.
  2485. The user can look at the filenames inside the directory.
  2486.  
  2487.  
  2488.  
  2489. 4.7.2  Write
  2490.  
  2491.  
  2492. Access means that the user can add or delete files to the
  2493. contents of the directory.
  2494.  
  2495.  
  2496.  
  2497. 4.7.3  Execute
  2498.  
  2499.  
  2500. Executing a directory doesn't really make a lot of sense so think
  2501. of this as a traverse permission.  This access allows the user to
  2502. reference the directory name in a command.  The reference is not
  2503. necessarily explicit, since the shell deduces the absolute
  2504. pathname of a command from the user's environment.  For example,
  2505. the shell knows that the full pathname of the ls command is
  2506. /bin/ls.  A user must have execute access to the bin directory in
  2507. order to execute ls.
  2508.  
  2509. If traverse permissions are denied, others cannot change to it or
  2510. through it.  Another user can't do a cd to the protected
  2511. directory or any subdirectory beneath it.
  2512.                                                                    IN CLASS QUIZ
  2513.                                                                     ┌────────┐
  2514.                                                                     │ /      │  
  2515.                                                                     └────┬───┘                                                                       
  2516.                                                                          │ 
  2517.                             ┌──────────────┬──────────────┬──────────────┴───────────┬──────────────┬──────────────┐
  2518.                             │              │              │                          │              │              │
  2519.                        ┌────┴─────┐   ┌────┴────┐    ┌────┴────┐                ┌────┴────┐    ┌────┴────┐    ┌────┴────┐  
  2520.                        │   bin    │   │   tmp   │    │   etc   │                │   mnt   │    │   lib   │    │   dev   │  
  2521.                        └──────────┘   └─────────┘    └─────────┘                └────┬────┘    └─────────┘    └─────────┘  
  2522.                                                                                      │          
  2523.                    ┌──────────────────────────────────────┬──────────────────────────┴───────┬──────────────────────────────────┐
  2524.                    │                                      │                                  │                                  │
  2525.              ┌─────┴─────┐                           ┌────┴────┐                        ┌────┴────┐                        ┌────┴────┐
  2526.              │   Uni1    │                           │  Uni2   │                        │  Uni3   │                        │  Uni4   │
  2527.              └─────┬─────┘                           └────┬────┘                        └────┬────┘                        └────┬────┘  
  2528.  {1} ┌─────────────┼────────────┐                 ┌───────┴────────┐             ┌───────────┼───────────┐               ┌──────┴─────┐
  2529. ┌────┴─────┐ ┌─────┴─────┐ ┌────┴────┐      ┌─────┴─────┐    ┌─────┴─────┐  ┌────┴────┐ ┌────┴────┐ ┌────┴────┐     ┌────┴────┐  ┌────┴────┐
  2530. │  filea   │ │  fileb    │ │  Dira   │      │   filea   │    │   Filea   │  │  file1  │ │  File2  │ │  file3  │{5}  │   Dir1  │  │   Dir2  │
  2531. └──────────┘ └───────────┘ └────┬────┘      └───────────┘    └─────┬─────┘  └─────────┘ └────┬────┘ └─────────┘     └─────┬───┘  └────┬────┘
  2532.                                 │                                  │                         │                            │           │ 
  2533.      ┌─────────────┬────────────┤                                  │                         │               ┌────────────┤           │
  2534. ┌────┴─────┐ ┌─────┴─────┐ ┌────┴────┐                       ┌─────┴─────┐              ┌────┴────┐     ┌────┴────┐  ┌────┴────┐ ┌────┴────┐
  2535. │  filea   │ │    Dirb   │ │  fileb  │ {2}               {3} │   filea   │              │  Filea  │  {6}│ File1a  │  │ file1b  │ │ Dir2a   │
  2536. └──────────┘ └───────────┘ └─────────┘                       └───────────┘              └────┬────┘     └─────────┘  └─────────┘ └────┬────┘
  2537.                                                                                              │                                        │
  2538. Write the complete pathname for the     5.  ________________________________            ┌────┴────┐                            ┌──────┴──────┐ {7} 
  2539. files numbered above.                                                               {4} │  filea  │                       ┌────┴────┐   ┌────┴────┐
  2540.                                         6.  ________________________________            └─────────┘                       │ File2aa │   │ file2ab │
  2541. 1.  _______________________________                                               8.  You are in /mnt/Uni1 and want #1.   └─────────┘   └─────────┘
  2542.                                         7.  ________________________________          
  2543. 2.  _______________________________                                                   ______________________________________          
  2544.                                                                                       
  2545. 3.  _______________________________     Write the minimum pathname needed for     9.  You are in /mnt/Uni3/File2 and want #4
  2546.                                         each of the following:                        
  2547. 4.  _______________________________                                                   ______________________________________ 
  2548. 4.7.4  Typical Root Directory
  2549.  
  2550.  
  2551. ┌──────────────────────────────────────────────────────────────────────────────────────────┐
  2552. │ $ ls -FC /                                                                               │
  2553. │                                                                                          │
  2554. │                                                                                          │
  2555. │ Student/           bin/             lib/           stand/            u2/         user2/  │
  2556. │                                                                                          │
  2557. │ Students/          bad/             lisp/          tmp/              unix*       usr/    │
  2558. │                                                                                          │
  2559. │ Support/           dev/             lost+found/    tmp.sh            unix.bak*   usr2/   │
  2560. │                                                                                          │
  2561. │ etc/               mnt/             tmp1/          unix.test*        usr3/       a.out*  │
  2562. │                                                                                          │
  2563. │ foo                rel_notes        tmp2/          user0/            install/    shlib/  │
  2564. │                                                                                          │
  2565. │ u1/                user1/                                                                │
  2566. └──────────────────────────────────────────────────────────────────────────────────────────┘
  2567.                                             NOTES
  2568. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2569. Workshop 4
  2570.  
  2571.  
  2572. This workshop will reinforce your understanding of the topics
  2573. presented in this chapter.  Login to the Multimax using the
  2574. username and password from the previous workshop.  All students
  2575. should complete the entire workshop.  You may need to work in a
  2576. team on the computer exercises.
  2577.  
  2578. DESK EXERCISES
  2579.  
  2580.  
  2581. 1.     What is a directory?
  2582.  
  2583.  
  2584.  
  2585.  
  2586. 2.     What is an absolute path name?
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592. 3.     What is a relative path name?
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598. 4.     What command will create a directory?
  2599.  
  2600.  
  2601.  
  2602.  
  2603. 5.     What command will remove a directory?
  2604.  
  2605.  
  2606.  
  2607.  
  2608. 6.     What command is used to change from one directory to
  2609.        another?
  2610.  
  2611.  
  2612.  
  2613.  
  2614. 7.     How would you change the name of a directory?
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.                                   Continue on the next page
  2621. 8.     What do the files . (dot) and .. (dot dot) represent?
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628. 9.     What does execute permission on a directory mean?
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635. COMPUTER EXERCISES
  2636.  
  2637.  
  2638. 10.    Login to the Multimax.
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644. 11.    What is the absolute pathname of your current working
  2645.        directory? Hint: pwd
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651. 12.    Type cd etc
  2652.  
  2653.        What message do you get? Can you explain why?
  2654.  
  2655.  
  2656.  
  2657.  
  2658. 13.    Type cd /etc
  2659.  
  2660.        What is your current working directory?  Why did this
  2661.        happen?
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667. 14.    Enter the command that will return you to your home
  2668.        directory.
  2669.  
  2670.  
  2671.  
  2672.                                   Continue on the next page
  2673.  
  2674. 15.    Enter the command that will change to your current working
  2675.        directories parent.
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682. 16.    List the contents of your current working directory
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688. 17.    List the permissions, ownership, size, etc. of your current
  2689.        directories parent.
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695. 18.    Enter the command to change to your home directory.  Create
  2696.        a new subdirectory with a name of your choice.
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702. 19.    Change the current working directory to the subdirectory you
  2703.        just created.
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709. 20.    Rename the subdirectory to Student.  Is this the same
  2710.        subdirectory as everyone else in the class?  Why?
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716. 21.    Change to your home directory and delete the subdirectory
  2717.        Student.
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723. 22.    Logout of the Multimax and the Annex.
  2724.                                             NOTES
  2725. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2726. 5.  COMMUNICATION UTILITIES
  2727.  
  2728.  
  2729. This chapter will deal with the utilities that allow one user to
  2730. communicate with another.  Some of these utilities require the
  2731. other user to be logged in and others do not. 
  2732.  
  2733. The mail utility can be used to send messages to one or more
  2734. users.  It is not necessary for the user that is receiving the
  2735. message to be logged in.  The mail utility delivers the message
  2736. to a file belonging to the recipient.  The user will be notified
  2737. that a mail message exists. Messages can be saved or deleted and
  2738. a reply sent.
  2739.  
  2740. The talk utility is an interactive session that allows each user
  2741. to send message simultaneously to each other.  Both users must be
  2742. currently logged in for this utility to work.
  2743.  
  2744. The write utility is a one-way communication.  It allows you to
  2745. send a message to another user. The user must be logged in and no
  2746. reply is possible. 
  2747.  
  2748. 5.1  Sending Electronic Mail
  2749.  
  2750.  
  2751. The basic command line format for sending mail is:
  2752.                              
  2753. ╔═══════════════════════════════════════════════════════════════╗
  2754. ║  Command Format: mailx [options] [user1[usern]]               ║
  2755. ║                                                               ║
  2756. ║    options - see man pages for a complete list                ║
  2757. ║                                                               ║
  2758. ║    user1[usern] - one or more users to get the mail           ║
  2759. ║                   message                                     ║
  2760. ║                                                               ║
  2761. ╚═══════════════════════════════════════════════════════════════╝
  2762.  
  2763. The username is the name assigned by the system administrator to
  2764. a user on the UNIX system (for example, rharding).  The username
  2765. can also include a system name if the recipient is on another
  2766. UNIX system that can communicate with the sender's (for example,
  2767. sys2!rharding).  Let's assume that the recipient is on the local
  2768. UNIX system.
  2769.  
  2770.  
  2771. Sample Session:
  2772.  
  2773. ┌───────────────────────────────────────────────────────────────┐
  2774. │ $mailx rharding(Ret)                                          │
  2775. │ Subject:                                                      │
  2776. └───────────────────────────────────────────────────────────────┘
  2777.  
  2778. Now enter the subject of your message followed by a (Ret).  The
  2779. cursor will appear on the next line.  Simply start typing the
  2780. message.  There is no limit to the length of a message.  When you
  2781. have finished, send it by typing Ctrl-D on a new line.
  2782.  
  2783.  
  2784. Sample Session:
  2785.  
  2786. ┌───────────────────────────────────────────────────────────────┐
  2787. │ $mailx rharding(Ret)                                          │
  2788. │ Subject: Work schedule(Ret)                                   │
  2789. │ Please check the bulletin board(Ret)                          │
  2790. │ for the new work schedule.(Ret)                               │
  2791. │ Ctrl-D                                                        │
  2792. │ $                                                             │
  2793. └───────────────────────────────────────────────────────────────┘
  2794.                                                                  
  2795. The shell prompt on the last line indicates that the message has
  2796. been queued (placed in a waiting line) and will be sent.
  2797. 5.2  Reading Mail
  2798.  
  2799.  
  2800. To read your mail enter:
  2801.  
  2802.  
  2803. Example:
  2804.  
  2805. .................................................................
  2806. . $mailx                                                        .
  2807. .................................................................
  2808.  
  2809. Executing this command places you in the command mode of mailx. 
  2810. If there are no mail messages waiting to be read, you will see
  2811. the following message on the screen:
  2812.  
  2813.  
  2814. Sample Session:
  2815.  
  2816. ┌───────────────────────────────────────────────────────────────┐
  2817. │ $mailx                                                        │
  2818. │ No mail for teacher                                           │
  2819. │ $                                                             │
  2820. └───────────────────────────────────────────────────────────────┘
  2821.  
  2822. Of course, your username will appear instead of 'teacher'.
  2823.  
  2824. When a mail message appears in the recipient's mailbox, the
  2825. following message will appear on the screen. 
  2826.  
  2827.  
  2828. Example:
  2829.  
  2830. .................................................................
  2831. . you have mail                                                 .
  2832. .................................................................
  2833.  
  2834. This notice will appear when you login to the system or upon
  2835. return to the shell from another procedure.
  2836. When you have been notified of mail waiting to be read, enter the
  2837. command to enter mail.  The screen will look something like this:
  2838.  
  2839.  
  2840. Sample Session:
  2841.  
  2842. ┌───────────────────────────────────────────────────────────────┐
  2843. │ $mailx                                                        │
  2844. │                                                               │
  2845. │ mailx version 3.1  Type ? for help.                           │
  2846. │ "/usr/mail/teacher": 3 messages 3 new                         │
  2847. │ >N  1 bhood         Fri Jul 13 13:01   21/324   Review session│
  2848. │  N  2 class2        Fri Jul 13 14:53   15/211   Meeting notice│
  2849. │  N  3 phajny        Fri Jul 13 16:53   11/272   Reorganization│
  2850. │ ?                                                             │
  2851. └───────────────────────────────────────────────────────────────┘
  2852.                                                       
  2853. This first line indicates the version of mailx that is being
  2854. used.  In this case, version 3.1.  There is a reminder that help
  2855. is available by typing the ?.  The second line shows the path
  2856. name of the file used as input (usually the same as the username)
  2857. and a count of the total number of messages and their status. 
  2858. The messages are numbered in sequence with the latest one
  2859. received on the bottom of the list.  To the left of the sequence
  2860. numbers, there may be a status indicator; N for new, U for
  2861. unread.  The > symbol points to the current message.  The other
  2862. fields in the header line show the login of the sender, day,
  2863. date, and time it was delivered.  The next field has the number
  2864. of lines and characters in the message.  The last field is the
  2865. subject of the message; it might be blank.
  2866.  
  2867. To read the mail messages you can do any of the following steps:
  2868.  
  2869.  
  2870. (Ret)                       -      This will cause the current message to
  2871.                                    be displayed.  The current message is
  2872.                                    the once indicated by the > sign.
  2873.  
  2874. p (Ret)                     -      This is equivalent to pressing the (Ret)
  2875.                                    key with no argument.  The current
  2876.                                    message will be displayed.
  2877.  
  2878. p 2 (Ret)                   -      You can press p (for print) or t (for
  2879.                                    type) followed by the message number(s).
  2880.  
  2881. p teacher (Ret)             -      This will print all messages from user
  2882.                                    teacher.
  2883. 5.3  Saving Mail
  2884.  
  2885.  
  2886. All messages that are not specifically deleted are saved when
  2887. quitting mailx.  Messages that have been saved are placed in a
  2888. file in the home directory called mbox.  The mbox file is the
  2889. default.  It is possible to save them in a file of the users
  2890. choice.  Messages that have not been read are held in the
  2891. mailbox.  The command to save messages comes in two forms.  
  2892.  
  2893. ╔═══════════════════════════════════════════════════════════════╗
  2894. ║  Command Format:  S [msglist]                                 ║
  2895. ║                                                               ║
  2896. ║     msglist =                                                 ║
  2897. ║                                                               ║
  2898. ║     n          message number n the current message           ║
  2899. ║                                                               ║
  2900. ║     ^          the first undeleted message                    ║
  2901. ║                                                               ║
  2902. ║     $          the last message                               ║
  2903. ║                                                               ║
  2904. ║     *          all messages                                   ║
  2905. ║                                                               ║
  2906. ║     n-m        an inclusive range of message numbers          ║
  2907. ║                                                               ║
  2908. ║     user       all messages from user                         ║
  2909. ║                                                               ║
  2910. ║     /string    All messages with string in the subject line   ║
  2911. ║                (case is ignored)                              ║
  2912. ║                                                               ║
  2913. ║     :c         all messages of type c where c is:             ║
  2914. ║                                                               ║
  2915. ║                    d - deleted messages                       ║
  2916. ║                    n - new messages                           ║
  2917. ║                    o - old messages                           ║
  2918. ║                    r - read messages                          ║
  2919. ║                    u - unread messages                        ║
  2920. ║                                                               ║
  2921. ╚═══════════════════════════════════════════════════════════════╝
  2922. Messages specified by the msglist argument are saved in a file in
  2923. the current directory named for the author of the first message
  2924. in the list.  If the username 'teacher' sent the message and you
  2925. entered:
  2926.  
  2927.  
  2928. Sample Session:
  2929.  
  2930. ┌───────────────────────────────────────────────────────────────┐
  2931. │ ? S *                                                         │
  2932. │ "teacher" [New file] 11/268                                   │
  2933. │ ?                                                             │
  2934. └───────────────────────────────────────────────────────────────┘
  2935.  
  2936. The mail message has been saved into a file in your current
  2937. directory called 'teacher'.  If you want to save the file in
  2938. another filename, you can do that with the second method of
  2939. saving mail.  Basically, it works the same as S; but it allows
  2940. you to save the mail to a file you specify.
  2941.  
  2942. ╔═══════════════════════════════════════════════════════════════╗
  2943. ║  Command Format:  s  [msglist]  [file1]                       ║
  2944. ║                                                               ║
  2945. ║     msglist - same arguments as before                        ║
  2946. ║                                                               ║
  2947. ║     file1 - filename which will receive the saved mail        ║
  2948. ╚═══════════════════════════════════════════════════════════════╝
  2949. 5.4  Deleting Mail
  2950.  
  2951.  
  2952. To delete a message, enter a d at the command mode prompt
  2953. followed by a msglist argument.  An msglist argument can be any
  2954. one the following:
  2955.  
  2956.  
  2957.  
  2958.        n             message number n the current message
  2959.  
  2960.        ^             the first undeleted message
  2961.  
  2962.        $             the last message
  2963.  
  2964.        *             all messages
  2965.  
  2966.        n-m           an inclusive range of message numbers
  2967.  
  2968.        user          all messages from user
  2969.  
  2970.        /string       All messages with string in the subject line (case
  2971.                      is ignored)
  2972.  
  2973.        :c            all messages of type c where c is:
  2974.  
  2975.                             d - deleted messages
  2976.                             n - new messages
  2977.                             o - old messages
  2978.                             r - read messages
  2979.                             u - unread messages
  2980.  
  2981. For example, suppose you wanted to delete all of your mail
  2982. messages.  Enter the following command at the command mode
  2983. prompt.  The command mode prompt for mailx is the question mark
  2984. (?).
  2985.  
  2986.  
  2987. Sample Session:
  2988.                                                                 
  2989. ┌───────────────────────────────────────────────────────────────────────────┐
  2990. │ $mailx                                                                    │
  2991. │                                                                           │
  2992. │  mailx version 3.1  Type ? for help.                                      │
  2993. │  "/usr/mail/teacher": 3 messages 3 new                                    │
  2994. │  >N  1 bhood              Fri Jul 13 13:01   21/324   Review  session     │
  2995. │   N  2 class2             Fri Jul 13 14:53   15/211   Meeting notice      │
  2996. │   N  3 phajny             Fri Jul 13 16:53   11/272   Reorganization      │
  2997. │ ? d *                                                                     │
  2998. │ ? q                                                                       │
  2999. │ $                                                                         │
  3000. └───────────────────────────────────────────────────────────────────────────┘
  3001.                                                               
  3002.  
  3003. All of the messages have now been deleted.  The messages are not
  3004. actually deleted until the mailbox is exited.  Until that happens
  3005. the u (for undelete) command is available.  Once the quit command
  3006. (q) is entered, however, the deleted messages are gone.
  3007. 5.5  Undeliverable Mail
  3008.  
  3009.  
  3010. If there has been an error in the recipient's username, the mail
  3011. command will not be able to deliver the message.  For example,
  3012. let's say you misspelled the username.  It will return the mail
  3013. in a message that includes the system name and username of the
  3014. sender and recipient.  It also includes a message stating the
  3015. reason for the failure.
  3016.  
  3017. The sender of the message would get a message from mailx
  3018. indicating that an error had occurred.
  3019.  
  3020.  
  3021. Sample Session:
  3022.  
  3023. ┌────────────────────────────────────────────────────────────────────────────┐
  3024. │ $mailx                                                                     │
  3025. │                                                                            │
  3026. │ mailx version 3.1  Type ? for help.                                        │
  3027. │ "/usr/mail/teacher": 1 message 1 new                                       │
  3028. │ >N  1 teacher            Fri Jul 13 13:45   25/655 Returned mail:User unkno│
  3029. │ ?                                                                          │
  3030. │ Message  1:                                                                │
  3031. │ From teacher Fri Jul 13 13:45:57 1990                                      │
  3032. │ Received: by domax1.UUCP (5.51/)                                           │
  3033. │      id AA01997; Fri, 13 Jul 90 13:45:54 mdt                               │
  3034. │ Date: Fri, 13 Jul 90 13:45:54 mdt                                          │
  3035. │ From: Mail Delivery Subsystem <MAILER-DAEMON>                              │
  3036. │ Subject: Returned mail: User unknown                                       │
  3037. │ Message-Id: <9007131945.AA01997@domax1.UUCP>                               │
  3038. │ To: teacher                                                                │
  3039. │ Status: R                                                                  │
  3040. │                                                                            │
  3041. │    ----- Transcript of session follows -----                               │
  3042. │ 550 snoopy... User unknown: No such file or directory                      │
  3043. │                                                                            │
  3044. │    ----- Unsent message follows -----                                      │
  3045. │ Received: by domax1.UUCP (5.51/)                                           │
  3046. │      id AA01995; Fri, 13 Jul 90 13:45:54 mdt                               │
  3047. │ Date: Fri, 13 Jul 90 13:45:54 mdt                                          │
  3048. │ From: Teacher Account D-7130 <teacher>                                     │
  3049. │ Message-Id: <9007131945.AA01995@domax1.UUCP>                               │
  3050. │ To: snoopy                                                                 │
  3051. │ Subject: Meeting notice                                                    │
  3052. │                                                                            │
  3053. │ Meeting will be held at Charlie Brown's house.                             │
  3054. │ July 13, 1990                                                              │
  3055. │ 7:30 p.m.                                                                  │
  3056. │                                                                            │
  3057. │ ?                                                                          │ 
  3058. └────────────────────────────────────────────────────────────────────────────┘
  3059.  
  3060. The ? is the mailx command mode prompt.  Mailx is asking for
  3061. input.  
  3062.  
  3063. A list of commands available can be shown by entering a ?.
  3064.  
  3065.  
  3066. Sample Session:
  3067.  
  3068. ┌────────────────────────────────────────────────────────────────────────────┐
  3069. │ ? ?                                                                        │
  3070. │                         mailx commands                                     │
  3071. │ type [msglist]          print messages                                     │
  3072. │ next                    goto and type next message                         │
  3073. │ edit [msglist]          edit messages                                      │
  3074. │ from [msglist]          give header lines of messages                      │
  3075. │ delete [msglist]        delete messages                                    │
  3076. │ undelete [msglist]      restore deleted messages                           │
  3077. │ save [msglist] file     append messages to file                            │
  3078. │ reply [message]         reply to message, including all recipients         │
  3079. │ Reply [msglist]         reply to the authors of the messages               │
  3080. │ preserve [msglist]      preserve messages in mailbox                       │
  3081. │ mail user               mail to specific user                              │
  3082. │ quit                    quit, preserving unread messages                   │
  3083. │ xit                     quit, preserving all messages                      │
  3084. │ header                  print page of active message headers               │
  3085. │ !                       shell escape                                       │
  3086. │ cd [directory]          chdir to directory or home if none given           │
  3087. │ list                    list all commands (no explanations)                │
  3088. │ top [msglist]           print top 5 lines of messages                      │
  3089. │ z [-]                   display next [last] page of 10 headers             │
  3090. │                                                                            │
  3091. │ [msglist] is optional and specifies messages by number, author,            │
  3092. │ or type.                                                                   │
  3093. │ The default is the current message.                                        │
  3094. │ ?                                                                          │
  3095. └────────────────────────────────────────────────────────────────────────────┘
  3096.  
  3097. This is a partial list of mailx commands available to you.  We
  3098. will not discuss all of them.  If you are interested in the other
  3099. features, you can use the on-line manual pages to find out how to
  3100. use them.
  3101. 5.6  Talk Utility
  3102.  
  3103.  
  3104. Talk is a visual communication program which copies lines from
  3105. one terminal to that of another user.  This is similar to the
  3106. phone utility on VMS.  Once communication is established between
  3107. two users, they can both type simultaneously with their output
  3108. appearing in separate windows.
  3109.  
  3110. ╔════════════════════════════════════════════════════════════════════════════╗
  3111. ║  Command Format:  talk <user1> [ttyname]                                   ║
  3112. ║                                                                            ║
  3113. ║     user1 -     If you are talking to someone on the same machine,         ║
  3114. ║                 then this is just the person's username.  If               ║
  3115. ║                 you want to talk to a user on another host, then           ║
  3116. ║                 user1 is of the form:                                      ║
  3117. ║                                                                            ║
  3118. ║                 host!user     or                                           ║
  3119. ║                 host.user     or                                           ║
  3120. ║                 host:user     or                                           ║
  3121. ║                 user@host                                                  ║
  3122. ║                                                                            ║
  3123. ║                 user@host being preferred                                  ║
  3124. ║                                                                            ║
  3125. ║     ttyname   - If the person you want to talk to is logged on             ║
  3126. ║                 more than once, you can use the ttyname argument           ║
  3127. ║                 to indicate the terminal name.                             ║
  3128. ╚════════════════════════════════════════════════════════════════════════════╝
  3129.  
  3130. For illustration, let's assume we want to talk with the user
  3131. student on the same machine.  The command is:
  3132.  
  3133.  
  3134. Example originator:
  3135.  
  3136. .................................................................
  3137. . $talk student                                                 .
  3138. .................................................................
  3139.  
  3140.  
  3141. Example recipient:
  3142.  
  3143. .................................................................
  3144. . Message from Talk_Daemon@domax1 at 17:36 ...                  .
  3145. . talk: connection requested by teacher@domax1.                 .
  3146. . talk: respond with:  talk teacher@domax1                      .
  3147. .................................................................
  3148. When the recipient has typed in talk teacher@domax1, the
  3149. following message will appear on the originators screen:
  3150.  
  3151.  
  3152. Sample Session originator:
  3153.  
  3154. ┌───────────────────────────────────────────────────────────────┐
  3155. │  Connection established.                                      │
  3156. └───────────────────────────────────────────────────────────────┘
  3157.  
  3158. The screen will be divided in half by a row of dash characters. 
  3159. The originator will type a message on the top half, and the same
  3160. message will appear on the lower half of the screen on the
  3161. recipient's screen.
  3162.  
  3163. Likewise, everything the recipient types on the top of his screen
  3164. the same message will appear on the bottom of the originators
  3165. screen.  Once this communication is established, the parties may
  3166. type simultaneously with their output appearing in different
  3167. windows.  While in talk, Ctrl-L will cause the screen to be
  3168. reprinted, and the erase and kill characters work as you would
  3169. expect.
  3170.  
  3171.  
  3172. Sample Session originator:
  3173.  
  3174. ┌───────────────────────────────────────────────────────────────┐
  3175. │  Hi Snoopy,                                                   │
  3176. │  Charlie Brown suggests we meet at noon today.                │
  3177. │                                                               │
  3178. │                                                               │
  3179. │                                                               │
  3180. │                                                               │
  3181. │                                                               │
  3182. │                                                               │
  3183. │-------------------------------------------------------------- │
  3184. │  OK, but the billiard championship is in my house at 1 P.M.   │
  3185. │                                                               │
  3186. │                                                               │
  3187. │                                                               │
  3188. │                                                               │
  3189. │                                                               │
  3190. │                                                               │
  3191. └───────────────────────────────────────────────────────────────┘
  3192. Sample session recipient:
  3193.  
  3194. ┌───────────────────────────────────────────────────────────────┐
  3195. │  OK, but the billiard championship is in my house at 1 P.M.   │
  3196. │                                                               │
  3197. │                                                               │
  3198. │                                                               │
  3199. │                                                               │
  3200. │                                                               │
  3201. │                                                               │
  3202. │                                                               │
  3203. │-------------------------------------------------------------- │
  3204. │  Hi Snoopy,                                                   │
  3205. │  Charlie Brown suggests we meet at noon today.                │
  3206. │                                                               │
  3207. │                                                               │
  3208. │                                                               │
  3209. │                                                               │
  3210. │                                                               │
  3211. └───────────────────────────────────────────────────────────────┘
  3212.  
  3213. When the communication is finished, the interrupt character will
  3214. cause the talk utility to exit.
  3215.  
  3216.  
  3217. Example:
  3218.  
  3219. .................................................................
  3220. .     [Connection closing. Exiting]                             .
  3221. .................................................................
  3222. 5.7  Talk Permission Denied
  3223.  
  3224.      
  3225. If you don't wish to have your work interrupted by a request to
  3226. establish a talk connection, you can deny messages.
  3227.  
  3228. ╔═══════════════════════════════════════════════════════════════╗
  3229. ║  Command Format:  mesg  [-[n][y]]                             ║ 
  3230. ║                                                               ║
  3231. ║    n -  no, forbids messages via write by revoking non-user   ║
  3232. ║         write permission on the user's terminal.              ║
  3233. ║                                                               ║
  3234. ║    y -  yes, reinstates permission                            ║
  3235. ║                                                               ║
  3236. ║                                                               ║
  3237. ║     mesg with no arguments will report the current state      ║
  3238. ║     without changing it.                                      ║
  3239. ╚═══════════════════════════════════════════════════════════════╝
  3240.  
  3241.  
  3242. Sample Session:
  3243.  
  3244. ┌───────────────────────────────────────────────────────────────┐
  3245. │ $mesg                                                         │
  3246. │ is y                                                          │
  3247. │ $mesg -n                                                      │
  3248. │ $mesg                                                         │
  3249. │ is n                                                          │
  3250. │ $mesg -y                                                      │
  3251. │ $mesg                                                         │
  3252. │ is y                                                          │
  3253. │ $                                                             │
  3254. └───────────────────────────────────────────────────────────────┘
  3255.  
  3256. The default permission is enabled.  Some UNIX commands, however,
  3257. disallow messages in order to prevent messy output.
  3258. 5.8  Write Utility
  3259.  
  3260.  
  3261. This command will write a message to the screen of another user. 
  3262.  
  3263. ╔═══════════════════════════════════════════════════════════════╗
  3264. ║  Command Format:  write <user1> [ttyname]                     ║
  3265. ║                                                               ║
  3266. ║   user1  - username of the user                               ║
  3267. ║                                                               ║
  3268. ║   ttyname - which terminal to send (i.e. tty00)               ║
  3269. ╚═══════════════════════════════════════════════════════════════╝
  3270.  
  3271.  
  3272. Sample Session originator:
  3273.  
  3274. ┌───────────────────────────────────────────────────────────────┐
  3275. │ $write lucy                                                   │
  3276. │ Hello Lucy,                                                   │
  3277. │ What's the latest from the Psychology Department?             │
  3278. │ (interrupt character)                                         │
  3279. │ $                                                             │
  3280. └───────────────────────────────────────────────────────────────┘
  3281.  
  3282.  
  3283. Sample Session recipient:
  3284.                                                                               
  3285. ┌────────────────────────────────────────────────────────────────────────────┐
  3286. │ $                                                                          │
  3287. │                                                                            │
  3288. │ Message from teacher on domax1 (rt021d0) [ Thu Jul 19 13:43:12 ] ..        │
  3289. │ Hello Lucy,                                                                │
  3290. │ What's the latest from the Psychology Department?                          │
  3291. │ <EOT>                                                                      │
  3292. │                                                                            │
  3293. │ $                                                                          │
  3294. └────────────────────────────────────────────────────────────────────────────┘
  3295.  
  3296. Here's a suggestion for using write to communicate a little
  3297. easier.
  3298.  
  3299. When the user first 'writes' to another user, wait for the
  3300. recipient to 'write' back before starting to send.  Both users
  3301. should agree on a signal to indicate to the other person that
  3302. they can reply.  How about 'o' for over.  The signal 'oo' could
  3303. be used for "over and out," which would mean that the
  3304. communication is finished.
  3305.                                             NOTES
  3306. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3307. Workshop 5
  3308.  
  3309.  
  3310. This workshop will reinforce your understanding of the topics
  3311. covered in this chapter.  Login to the Multimax with the username
  3312. and password given to you by the instructor.  Each student is to
  3313. complete the entire workshop.  Computer exercises might need to
  3314. be worked as a team.
  3315.  
  3316. DESK EXERCISES
  3317.  
  3318.  
  3319. 1.     What is the command to send an electronic mail message to
  3320.        another user on the Multimax?
  3321.  
  3322.  
  3323.  
  3324.  
  3325. 2.     Once you have entered the mail utility what command can you
  3326.        enter to get help?
  3327.  
  3328.  
  3329.  
  3330.  
  3331. 3.     What does the command d 5-9 accomplish?
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337. 4.     What is the command to exit the mail utility and return to
  3338.        the UNIX system prompt?
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344. 5.     What is the mailx command mode prompt?
  3345.  
  3346.  
  3347.  
  3348.  
  3349. 6.     How would you create a "talk" session to user Student2 on
  3350.        the host domax0?
  3351.  
  3352.  
  3353.  
  3354.  
  3355. 7.     What time does the billiard championship start?
  3356.  
  3357.  
  3358.                                   Continue on the next page
  3359.  
  3360. 8.     What UNIX command will prevent interruption of your work by
  3361.        someone wishing to "talk"?
  3362.  
  3363.  
  3364.  
  3365.  
  3366. 9.     Regarding "write", does the recipient need to be logged in?
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.        Regarding "talk", does the recipient need to be logged in?
  3373.  
  3374.  
  3375.  
  3376.  
  3377.  
  3378.  
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.                                   Continue on the next page
  3412. COMPUTER EXERCISES
  3413.  
  3414.  
  3415. 10.    Login to the Multimax.
  3416.  
  3417.  
  3418.  
  3419.  
  3420. 11.    Send a mail message to another student in the class.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.        How can you find out who is logged in?  (who?)
  3426.  
  3427.  
  3428.  
  3429.  
  3430.        Does the recipient need to be logged in?
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437. 12.    Send a mail message to username lucy. (lucy does not exist) 
  3438.  
  3439.        What happened?  Why?
  3440.  
  3441.  
  3442.  
  3443.  
  3444.  
  3445.  
  3446. 13.    Read your mail and save one message to the current working
  3447.        directory. 
  3448.  
  3449.  
  3450.        Delete all other mail messages.
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.                                   Continue on the next page
  3464. 14.    Establish a talk connection with another student.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470. 15.    What UNIX command do you enter to deny permission for a talk
  3471.        connection?  Try it!
  3472.  
  3473.  
  3474.  
  3475.  
  3476. 16.    Send a message to another student using the write command.
  3477.  
  3478.        How is this different from "talk?" 
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484. 17.    Logout of the Multimax and the Annex.
  3485.  
  3486.  
  3487. 6.  SHELL BASICS
  3488.  
  3489.  
  3490. There have been several shells written for UNIX.  They have
  3491. different features and each is in use through out the world.  The
  3492. BourneShell is the accepted standard for System V UNIX.  Another
  3493. shell is called the Cshell, named for "C" which is the high-level
  3494. programming language.  Another shell is the KornShell; it is
  3495. named after the person who developed it, David Korn.  It has more
  3496. features than the BourneShell and is of special interest to
  3497. programmers.
  3498.  
  3499. The purpose of this chapter is to give you some idea as to the
  3500. functions available through the shells and their general
  3501. function.  Details of shell programming are discussed in another
  3502. class, "UNIX Bourne Shell Programming".
  3503.  
  3504. UMAX makes full use of the ASCII character set.  Unlike operating
  3505. system command languages like VMS or NOS, UNIX is case sensitive. 
  3506. In addition, several characters have special meanings to the
  3507. shell.  We have already seen that a slash (/) by itself indicates
  3508. the root directory and is used with directory, subdirectory, and
  3509. filenames to indicate an absolute or relative pathname.
  3510.  
  3511. Other special characters that have meaning to the shell include:
  3512.  
  3513.               `    '    $    {    }    ||    &&    ;
  3514.  
  3515. Input to a command is usually taken from your keyboard, and the
  3516. output of a command is normally displayed on your monitor screen. 
  3517. Keyboard input is referred to as "standard input" or "stdin," and
  3518. screen output as "standard output" or "stdout."
  3519. 6.1  Input Redirection
  3520.  
  3521.  
  3522. It is possible to instruct UNIX to get data from a file rather
  3523. than from the keyboard.  This is called input redirection.  To
  3524. indicate that input to a command is to come from a file rather
  3525. than the keyboard, use the input redirection character (<).
  3526.  
  3527. ╔═══════════════════════════════════════════════════════════════╗
  3528. ║  Command Format:  command < input-file1                       ║
  3529. ║                                                               ║
  3530. ║    command   - a command                                      ║
  3531. ║                                                               ║
  3532. ║  input-file1 - input file that supplies input                 ║
  3533. ║                to the command                                 ║
  3534. ╚═══════════════════════════════════════════════════════════════╝
  3535.  
  3536. A Memory Trick:             The less-than symbol looks like a funnel.  If
  3537.                             you pour liquid into the wide end, it flows
  3538.                             to the narrow end.  The input-file "pours"
  3539.                             its contents into the command.
  3540.  
  3541.  
  3542. Sample Session:
  3543.                                                                  
  3544. ┌───────────────────────────────────────────────────────────────┐
  3545. │ $mailx phajny < report                                        │
  3546. │ $                                                             │
  3547. └───────────────────────────────────────────────────────────────┘
  3548.  
  3549. The file named report will be sent to the login name phajny. 
  3550. Mail normally expects the input to come from standard input, the
  3551. keyboard.  The input redirection symbol causes the input to mail
  3552. to come from the file called report.
  3553. 6.2  Output Redirection
  3554.  
  3555. It is also possible to instruct UNIX to send data to a file
  3556. rather than sending it to the default monitor screen.  This is
  3557. called output redirection.  To indicate that the output from a
  3558. command is to go into a file rather than be displayed on the
  3559. monitor screen, use the output redirection character >.
  3560.                    
  3561. ╔═══════════════════════════════════════════════════════════════╗
  3562. ║  Command Format:  command > output-file1                      ║ 
  3563. ║                                                               ║
  3564. ║      command    - a command                                   ║
  3565. ║                                                               ║
  3566. ║    output-file1 - output file that will receive the output    ║
  3567. ║                   from the command                            ║ 
  3568. ╚═══════════════════════════════════════════════════════════════╝
  3569.                                                                  
  3570.  
  3571. The memory trick still works; only now the funnel points toward
  3572. the file that will receive the output.
  3573.  
  3574. Sample Session:
  3575.  
  3576. ┌───────────────────────────────────────────────────────────────┐
  3577. │ $ls -l > listing                                              │
  3578. │ $                                                             │
  3579. └───────────────────────────────────────────────────────────────┘
  3580.  
  3581. The output of the ls command will not be displayed on the screen,
  3582. instead it will be in the file named listing.  If the file does
  3583. not exist, the shell will create it.  If it already exists, it
  3584. will be overwritten.
  3585.  
  3586. WARNING:      The shell will NOT issue a warning about overwriting
  3587.               the original file.
  3588.  
  3589. It is possible to use the cat command to create a file and input
  3590. text into that file using output redirection.  The following
  3591. example shows how this can be done.
  3592.  
  3593. Sample session:
  3594.  
  3595. ┌───────────────────────────────────────────────────────────────┐
  3596. │    $cat > file1                                               │
  3597. │      This is a line of text.                                    │
  3598. │    This is another line of text.                              │
  3599. │    (Ctrl-D)                                                   │
  3600. │    $cat file1                                                 │
  3601. │    This is a line of text.                                    │
  3602. │    This is another line of text.                              │
  3603. │    $                                                          │
  3604. └───────────────────────────────────────────────────────────────┘
  3605. 6.3  Output Redirection with Append 
  3606.  
  3607.  
  3608. The following shell command will also redirect the output to a
  3609. file but instead of overwriting the existing file, it will append
  3610. the output to the end of output-file.
  3611.  
  3612. ╔═══════════════════════════════════════════════════════════════╗
  3613. ║  Command Format:  command >> output-file1                     ║
  3614. ║                                                               ║
  3615. ║    command      - a command                                   ║
  3616. ║                                                               ║
  3617. ║    output-file1 - receives the output from command            ║
  3618. ╚═══════════════════════════════════════════════════════════════╝
  3619.  
  3620. Believe it or not, the memory trick still works; only in this
  3621. case, one funnel feeds onto another.  So the output is fed onto
  3622. the end of output-file.  Okay, it's a little far fetched; but it
  3623. can help you remember.  Try it.
  3624.  
  3625.  
  3626. Sample Session:
  3627.  
  3628. ┌───────────────────────────────────────────────────────────────┐
  3629. │ $ls -l subdir >> listing                                      │
  3630. │ $                                                             │
  3631. └───────────────────────────────────────────────────────────────┘
  3632.                                                                  
  3633. This will append the output of the ls command to the file listing
  3634. without destroying any existing data.  If the file does not
  3635. exist, the shell will create it.
  3636.  
  3637. Again, it's possible to append text to the end of an existing
  3638. file using the cat command.  Note the following example.
  3639.  
  3640.  
  3641. ┌───────────────────────────────────────────────────────────────┐
  3642. │    $cat >> file1                                              │
  3643. │      This is a third line of text.                              │
  3644. │    This is a fourth line of text.                             │
  3645. │    (Ctrl-D)                                                   │
  3646. │    $cat file1                                                 │
  3647. │    This is a line of text.                                    │
  3648. │    This is another line of text.                              │
  3649. │    This is a third line of text.                              │
  3650. │    This is a fourth line of text.                             │
  3651. │    $                                                          │
  3652. └───────────────────────────────────────────────────────────────┘
  3653.  
  3654. If the file does not exist it will be created and the text added.
  3655.  
  3656.  
  3657. 6.4  Input and Output Redirection
  3658.  
  3659.  
  3660. Input and output redirection can occur on the same command line.
  3661.  
  3662. ╔═══════════════════════════════════════════════════════════════╗
  3663. ║  Command Format:  command  < input-file1 >  output-file1      ║
  3664. ║                                                               ║
  3665. ║    command       - A command                                  ║
  3666. ║    input-file1   - supplies input to command                  ║ 
  3667. ║    output-file1  - receives the output from command           ║
  3668. ╚═══════════════════════════════════════════════════════════════╝
  3669.  
  3670.  
  3671. Sample Session:
  3672.  
  3673. ┌───────────────────────────────────────────────────────────────────────────────┐
  3674. │ $cat command_file                                                             │
  3675. │ p                                                                             │
  3676. │ $mailx < command_file > result_file                                           │
  3677. │                                                                               │
  3678. │ $cat result_file                                                              │
  3679. │ mailx version 3.1  Type ? for help.                                           │
  3680. │ "/usr/mail/teacher": 1 message 1 new                                          │
  3681. │ >N  1 teacher            Mon Dec 31 10:16   57/3171                           │
  3682. │ Message  1:                                                                   │
  3683. │ From teacher Mon Dec 31 10:16:30 1990                                         │
  3684. │ Received: by domax1.UUCP (5.51/)                                              │
  3685. │         id AA18976; Mon, 31 Dec 90 10:16:28 mst                               │
  3686. │ Date: Mon, 31 Dec 90 10:16:28 mst                                             │
  3687. │ From: Teacher Account D-7130 <teacher>                                        │
  3688. │ Message-Id: <9012311716.AA18976@domax1.UUCP>                                  │
  3689. │ To: teacher                                                                   │
  3690. │ Status: R                                                                     │
  3691. │                                                                               │
  3692. │ What's Happening                                                              │
  3693. │ by Pam Hajny                                                                  │
  3694. │ Denver Office                                                                 │
  3695. │                                                                               │
  3696. │ With IRM Training:                                                            │
  3697. │                                                                               │
  3698. │ A Reclamation-wide workshop was held in early October to discuss information  │
  3699. │ resources management training.  Trainers from each region and the Denver Offic│
  3700. │ shared training techniques, ideas and course materials.  We met one afternoon │
  3701. │ with the personnel training officers to discuss broad IRM training needs and  │
  3702. .                                                                               .
  3703. .                                                                               .
  3704. .                                                                               .
  3705.  
  3706. 6.5  Pipes
  3707.  
  3708.  
  3709. The output of a command can be used as the input to a second
  3710. command by using the "pipe" symbol (|) without using any
  3711. temporary files.  On some terminals the pipe symbol is a vertical
  3712. bar and on others it is a broken vertical bar.  Both will work
  3713. exactly the same.  The following command format shows how to use
  3714. the pipe symbol:
  3715.  
  3716. ╔═══════════════════════════════════════════════════════════════╗
  3717. ║  Command Format:  command1 | command2                         ║
  3718. ║                                                               ║
  3719. ║    command1  - a command                                      ║
  3720. ║                                                               ║
  3721. ║    command2  - a second command                               ║
  3722. ╚═══════════════════════════════════════════════════════════════╝
  3723.  
  3724. Example:
  3725.                                                                  
  3726. .................................................................
  3727. . $man acct | pg                                                .
  3728. .................................................................
  3729.  
  3730. The output from the command man are processed by the pg command
  3731. before appearing on your screen.  Normally the output from the
  3732. man command will appear on the monitor line after line until the
  3733. end is reached.  In this case, the output is "piped" to the pg
  3734. command; and the screen will stop scrolling after 23 lines so you
  3735. can read them.
  3736. 6.6  Wildcards
  3737.  
  3738.  
  3739. Wildcards are special characters that cause the shell to search
  3740. over a range of possible values.
  3741.  
  3742.  ? represents any one character, while 
  3743.  
  3744.  * stands for any number of characters including none.
  3745.  
  3746. Example:
  3747.                                            jo?eph
  3748.  
  3749. This indicates that the third letter of the string "jo eph" could
  3750. be any single character. Any character could be substituted for
  3751. the ? character, including numeric and special characters.
  3752.  
  3753. To limit the range of possible values, enclose the possibilities
  3754. in brackets [ ].
  3755.  
  3756. Example:
  3757.                                          jo[a-z]eph
  3758.  
  3759. This example limits the range of characters to the set lowercase
  3760. a through lowercase z.  Uppercase characters, numeric, or special
  3761. characters would not make a match.  Notice that only one charater
  3762. will make a match.
  3763.  
  3764. Using a comma as a separator between choices we can further
  3765. restrict the range. 
  3766.  
  3767. Example:
  3768.                                         jo[s,m,5]eph
  3769.  
  3770. The only set of characters that will make a match are lowercase
  3771. s, lowercase m, and the number 5.  No other character will make a
  3772. match.
  3773.  
  3774.  
  3775. The string  jos*  causes the shell to look for every string that
  3776. begins with the letters "jos," regardless of their length while
  3777. [i-k]*h  finds every string that begins with "i", "j", or "k" and
  3778. ends with an "h".
  3779.  
  3780.  
  3781.  
  3782.  
  3783.  
  3784.  
  3785.  
  3786.  
  3787.  
  3788. Wildcards are extremely useful in wide variety of applications. 
  3789. For example, if you want to use the man pages, but do not know
  3790. the exact command names on the subject of system accounting, try
  3791.  
  3792. Sample Session:
  3793.  
  3794. .................................................................
  3795. .   $man acc*                                                   .
  3796. .................................................................
  3797.  
  3798. All of the commands that begin with the letters acc followed by
  3799. any string (including none) will be passed to the man command as
  3800. arguments.
  3801.  
  3802.  
  3803. If you wanted to get a listing of all the files in your current
  3804. working directory that ended in .c (these are the C source code
  3805. programs). You could enter the following command:
  3806.  
  3807. Sample Session:
  3808.  
  3809. .................................................................
  3810. .    $ls *.c                                                    .
  3811. .................................................................
  3812. In order for the shell to stop interpretation of a special
  3813. character (i.e., use it as a normal character), it must be
  3814. preceded by a backslash (\) or enclosed in single quotes.
  3815.  
  3816. Example:
  3817.                                            jo\?eph
  3818.                                              or
  3819.                                           'jo?eph'
  3820.  
  3821. Both of these examples represent the string jo?eph.  The shell
  3822. will not interpret the question mark character as a wildcard
  3823. metacharacter.
  3824.  
  3825.  
  3826. 6.7  Reestablishing a Background Job
  3827.  
  3828.  
  3829. Processes in UNIX can run in the foreground or the background.
  3830. Foreground processes are interactive; the input is read from the
  3831. keyboard or standard in, and the out goes to the monitor screen
  3832. or standard out.  Background jobs run with no interaction with an
  3833. interactive terminal.  Your current interactive process can be
  3834. suspended by typing the break character at the shell prompt.
  3835.  
  3836.  
  3837. Sample Session:
  3838.  
  3839. ┌───────────────────────────────────────────────────────────────┐
  3840. │ $ <break>                                                     │
  3841. │ annex:                                                        │
  3842. └───────────────────────────────────────────────────────────────┘
  3843.  
  3844.  
  3845. The jobs command displays information on all current jobs
  3846. (sessions).  The most recent job is marked with a plus sign (+),
  3847. and the next previous is marked with a dash or minus sign (-).  A
  3848. job begins when you execute a command to connect to a host (or
  3849. another Annex).  A job ends when you logout from the host or
  3850. terminate the job at the Annex with the kill or hangup command.
  3851.  
  3852. The number of possible jobs allowed per user is determined by the
  3853. network administrator.  The number of jobs can range from 1 to 16
  3854. with a default of 3.
  3855. The Annex command to display the information about the current
  3856. job(s) is:
  3857.  
  3858. ╔═══════════════════════════════════════════════════════════════╗
  3859. ║  Command Format:  jobs                                        ║
  3860. ╚═══════════════════════════════════════════════════════════════╝
  3861.  
  3862.  
  3863. If there are no jobs, the annex: prompt will be displayed.  If
  3864. there are some 'suspended' jobs the following will appear:
  3865.  
  3866.  
  3867. Sample Session:
  3868.  
  3869. ┌───────────────────────────────────────────────────────────────┐
  3870. │ annex: jobs                                                   │
  3871. │ +1      rlogin domax1                                         │
  3872. │ -2      rlogin domax1                                         │
  3873. │ annex:                                                        │
  3874. └───────────────────────────────────────────────────────────────┘
  3875.  
  3876.  
  3877. This shows that there are two jobs in suspension.  Both of these
  3878. sessions did a remote login to domax1.  This is just for
  3879. illustration.
  3880. The fg (foreground) command returns to a suspended job.  The
  3881. command displays the job number and the Annex command that
  3882. created it.  When no arguments are provided, fg will return to
  3883. the most recent job.  With a numeric argument, fg returns the
  3884. specified job.
  3885.  
  3886. To connect with a suspended job (session) enter the following
  3887. Annex command:
  3888.  
  3889. ╔═══════════════════════════════════════════════════════════════╗
  3890. ║  Command Format:  fg [n]                                      ║
  3891. ║                                                               ║
  3892. ║     (none) -   most recent job (+) to foreground              ║
  3893. ║       n    -   job "n" to foreground                          ║ 
  3894. ╚═══════════════════════════════════════════════════════════════╝
  3895.                                                                 
  3896.                                                            
  3897. Sample Session:
  3898.  
  3899. ┌───────────────────────────────────────────────────────────────┐
  3900. │ annex: jobs                                                   │
  3901. │ +1      rlogin domax1                                         │
  3902. │ -2      rlogin domax1                                         │
  3903. │ annex:fg 1                                                    │
  3904. │ 1       rlogin domax1                                         │
  3905. │ (Ret)                                                         │
  3906. │ $                                                             │
  3907. └───────────────────────────────────────────────────────────────┘
  3908.                                             NOTES
  3909. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3910. Workshop 6
  3911.  
  3912. This workshop will reinforce your understanding of the topics
  3913. covered in this chapter.  Login to the Multimax with the username
  3914. and password given to you by the instructor.  Each student is to
  3915. complete the entire workshop.  Computer exercises might need to
  3916. be worked as a team.
  3917.  
  3918. DESK EXERCISES
  3919.  
  3920.  
  3921. 1.     What is the meaning of the term "case sensitive?"
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927. 2.     What is a wildcard?
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933. 3.     How does the shell interpret the following wildcards?
  3934.  
  3935.        a.     ?
  3936.  
  3937.        b.     [0-9]
  3938.  
  3939.        c.     *
  3940.  
  3941.  
  3942.  
  3943. 4.     How does the shell interpret the following strings?
  3944.  
  3945.        a.     M[i,r]*
  3946.  
  3947.  
  3948.        b.     b?ll
  3949.  
  3950.  
  3951.        c.     me??[1,2]
  3952.  
  3953.  
  3954.        d.     '*special*'
  3955.  
  3956.  
  3957.        e.     anyone\?
  3958.  
  3959.  
  3960.  
  3961.                                   Continue on the next page
  3962. 5.     What is "standard input?"
  3963.  
  3964.  
  3965.  
  3966.  
  3967.  
  3968.  
  3969. 6.     What symbol causes a command to take its input from a file? 
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976. 7.     What is "standard output?"
  3977.  
  3978.  
  3979.  
  3980.  
  3981.  
  3982. 8.     What symbol causes the output of a command to be redirected
  3983.        to a file?
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990. 9.     What symbol causes the output of a command to be redirected
  3991.        to the input of another command?
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998. 10.    What symbol is used to indicate input is to be from a file
  3999.        instead of the keyboard?
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006. 11.    How can the output from a command be saved in an ordinary
  4007.        file?
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.                                   Continue on the next page
  4014. 12.    What is a pipe?  No, it's not something you smoke.
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020. COMPUTER EXERCISES
  4021.  
  4022.  
  4023. 13.    Login to the Multimax
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029. 14.    How many different on-line manual entries are displayed by
  4030.        executing the command man ca*?
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037. 15.    Execute  man ls | pg.  What is the purpose of the |
  4038.        character?
  4039.  
  4040.  
  4041.  
  4042.  
  4043. 16.    Save the on-line manual pages on the cat command in a file
  4044.        called mp0. (hint: output redirection)
  4045.  
  4046.  
  4047.  
  4048.  
  4049.  
  4050. 17.    Save the on-line manual pages on the assist command in a
  4051.        file called mp1. (no hint this time)
  4052.  
  4053.  
  4054.  
  4055.  
  4056.  
  4057. 18.    Type cp mp0 man
  4058.  
  4059.        Does file mp0 still exist after this command is executed? 
  4060.  
  4061.        Why?
  4062.  
  4063.  
  4064.  
  4065.                                   Continue on the next page
  4066. 19.    Type mv mp1 assist
  4067.  
  4068.        Does file mp1 still exist after this command is executed?
  4069.  
  4070.        Why?
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076. 20.    Type cp mp3 man
  4077.  
  4078.        What error message do you get?
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084. 21.    Logout of the Multimax and the Annex.
  4085. 7.  UMAX FILE TRANSFER PROTOCOL (FTP)
  4086.  
  4087.  
  4088. File Transfer Protocol (FTP) is a utility which can transfer
  4089. files to and from TCP/IP networked computers.  TCP/IP stands for
  4090. Transmission Control Protocol/Internet Protocol and consists of a
  4091. suite of defacto standard protocols for networking computers. 
  4092. FTP is one protocol in that suite.  (Other significant protocols
  4093. within TCP/IP are TELNET, Simple Mail Transfer Protocol (SMTP),
  4094. and Network File Systems (NFS).)  The Client portion of UNIX FTP
  4095. lets users on the Multimax access file systems on a remote
  4096. computer.  The Server portion of UNIX FTP lets users on remote
  4097. computers access Multimax files.  For Reclamation, these remote
  4098. computers would be VAXes, CYBERs, IBMs, and Sun workstations.
  4099.  
  4100. Using FTP, you can access directories and files on a remote
  4101. computer and perform common operations, such as list and change
  4102. working directories, transfer files, create directories, delete
  4103. working directories, delete files and directories, and rename
  4104. files and directories.  Once you have entered the FTP utility,
  4105. you make a connection to the desired remote computer and then
  4106. work with the remote computer's files using FTP commands.  The
  4107. connection to the remote computer's FTP remains in effect until
  4108. terminated by the user.  Multimax FTP supports both local help
  4109. for FTP commands and remote help, which displays FTP elements
  4110. available on the remote computer.
  4111.  
  4112. Throughout this chapter, the term "local computer" will refer to
  4113. the Multimax.  The term "remote computer" will refer to the CYBER
  4114. mainframe or the VAX minicomputer.  Please be aware that these
  4115. procedures will work for any computer connected to the Ethernet
  4116. that has an FTP server installed.  The messages that appear may
  4117. be different, but the process will be the same.
  4118. 7.1  Initializing FTP on UMAX
  4119.  
  4120.  
  4121. FTP can be invoked on the Multimax using the following syntax:  
  4122.  
  4123. ╔═══════════════════════════════════════════════════════════════╗
  4124. ║                                                               ║
  4125. ║      Command Format:      ftp [options] [host]                ║
  4126. ║                                                               ║
  4127. ║           options - see man pages for a complete list           ║ 
  4128. ║                                                               ║
  4129. ║          host   - the name of the remote computer             ║
  4130. ║                                                               ║
  4131. ╚═══════════════════════════════════════════════════════════════╝
  4132.        
  4133. NOTE:         UNIX is case sensitive.  The commands and options must
  4134.               be entered as shown.  
  4135. 7.2  Establishing Connection with the Remote Computer
  4136.  
  4137.  
  4138. There are two ways to make a connection with the remote computer. 
  4139.  
  4140. 7.2.1  Calling FTP with no hostname
  4141.  
  4142. The first way is to invoke FTP using no options, simply enter the
  4143. ftp command at the shell prompt.  UMAX will respond with the ftp
  4144. prompt: ftp>
  4145.  
  4146.  
  4147. Sample Session:
  4148.  
  4149. ┌───────────────────────────────────────────────────────────────┐
  4150. │ $ftp                                                          │
  4151. │ ftp>                                                          │
  4152. └───────────────────────────────────────────────────────────────┘
  4153.  
  4154. FTP commands can now be entered.  The utility has its own set of
  4155. commands, and we will discuss about 12 of them in this chapter. 
  4156. A complete list of the FTP commands can be obtained by entering
  4157. help at the FTP prompt.
  4158.  
  4159. The command to establish a connection with remote computer is:
  4160.  
  4161. ╔═══════════════════════════════════════════════════════════════╗
  4162. ║                                                               ║
  4163. ║     Command Format: open <host> [port]                        ║
  4164. ║                                                               ║
  4165. ║     host - hostname, this host must have an FTP server.       ║
  4166. ║                                                               ║
  4167. ║     port - port number (optional)                             ║
  4168. ║                                                               ║
  4169. ╚═══════════════════════════════════════════════════════════════╝
  4170.  
  4171. This command will establish a connection to the remote computer's
  4172. FTP server.  The hostname for the VAX is ERC830. The following
  4173. FTP command will establish a connection with the VAX (ERC830):
  4174.  
  4175.  
  4176. VAX Sample Session:
  4177.  
  4178. ┌───────────────────────────────────────────────────────────────┐
  4179. │ ftp>open erc830                                               │
  4180. │ Connected to erc830.                                          │
  4181. │ 220 erc830 Wollongong FTP Server (Version 5.0) at Mon Dec 4   │
  4182. │ Name (ERC830:rharding):                                       │
  4183. └───────────────────────────────────────────────────────────────┘
  4184. The cursor will stop after the colon.  FTP is waiting for you to
  4185. enter the login name to use when signing on to the remote
  4186. computer.  FTP tries to help you out by giving you a default
  4187. login name.  In the above example, the default login name is
  4188. rharding.  To select the default name, press (Ret).  You can
  4189. enter any login name you want and then press (Ret).  After you
  4190. have selected the login name, either by choosing the default or
  4191. entering a new name, you will be asked for the password.
  4192.  
  4193.  
  4194. VAX Sample Session:
  4195.  
  4196. ┌───────────────────────────────────────────────────────────────┐
  4197. │ 331 Password required for rharding.                           │
  4198. │ Password:                                                     │
  4199. │ 230 User logged in, default directory D_1131:[RHARDING]       │
  4200. └───────────────────────────────────────────────────────────────┘
  4201.  
  4202. Enter the password required for the login name that you
  4203. specified.  Echoing is disabled and the password you enter will
  4204. not be displayed on the screen.  If you entered the correct
  4205. password, message number 230 will show you are logged in and the
  4206. default directory on the remote system.  You are now logged into
  4207. the remote computer system and can proceed to transfer files. 
  4208.  
  4209.  
  4210. CYBER Sample Session:
  4211.  
  4212. ┌───────────────────────────────────────────────────────────────┐
  4213. │ $ftp                                                          │
  4214. │ ftp>open cy2                                                  │
  4215. │ Connected to cy2.                                             │
  4216. │ 220 SERVICE READY FOR NEW USER.                               │
  4217. │ Name (cy2:rharding): class8                                   │
  4218. │ 331 USER NAME OKAY, NEED PASSWORD.                            │
  4219. │ Password: secret                                              │
  4220. │ 230 USER LOGGED IN, PROCEED.                                  │
  4221. │ ftp>                                                          │
  4222. └───────────────────────────────────────────────────────────────┘
  4223.                                                                  
  4224. This example for the CYBER is similar to the VAX example. Notice
  4225. that there a few differences. The login name was changed from
  4226. rharding and the username class8 was entered instead.
  4227. 7.2.2 Calling FTP with a hostname
  4228.  
  4229.  
  4230. The second method of signing on to the remote computer is to
  4231. specify the name of the remote computer on the call to ftp.
  4232.  
  4233.  
  4234. VAX Sample Session:
  4235.  
  4236. ┌───────────────────────────────────────────────────────────────┐
  4237. │ $ftp erc830                                                   │
  4238. │ 220 erc830 Wollongong FTP Server (Version 5.0) at Fri Dec     │
  4239. │ Name (ERC830:rharding):                                       │
  4240. └───────────────────────────────────────────────────────────────┘
  4241. You can now enter the username for the remote system, and you
  4242. will then be prompted for the password.  The effect of specifying
  4243. the hostname on the ftp command line is to do an "automatic" open
  4244. command.
  4245.  
  4246. NOTE:         The messages are slightly different from the VAX login.
  4247.               The login for the CYBER works in a similar manner.
  4248. 7.3  Local Computer Commands
  4249.  
  4250.  
  4251. From the FTP prompt, you can issue commands to the local computer
  4252. to display files or show the contents of a directory.  The
  4253. commands you enter are FTP commands; and although they might
  4254. resemble UNIX commands, they are NOT UNIX commands.
  4255.  
  4256. The FTP command to transfer file(s) from the remote computer to
  4257. the local computer is as follows:
  4258.  
  4259. ╔═══════════════════════════════════════════════════════════════╗
  4260. ║                                                               ║
  4261. ║  Command Format:  get <remote-file> [local-file]              ║
  4262. ║                                                               ║
  4263. ║     remote-file - the filename on the remote computer         ║
  4264. ║                                                               ║
  4265. ║     local-file  - the filename on the local computer          ║
  4266. ║                                                               ║
  4267. ╚═══════════════════════════════════════════════════════════════╝
  4268.  
  4269. This FTP command will retrieve the remote-file and store it on
  4270. the Multimax.  If the local-file name is not specified, the name
  4271. of the file on the Multimax will be the same as it was on the
  4272. remote computer.  The current settings for type, form, mode, and
  4273. structure will be used during the file transfer.
  4274.  
  4275.  
  4276. VAX Sample Session:
  4277.  
  4278. ┌───────────────────────────────────────────────────────────────┐
  4279. │ ftp>get overview.dat                                          │
  4280. │ 200 PORT Command OK.                                          │
  4281. │ 125 File transfer started correctly                           │
  4282. │ 226 File transfer completed ok                                │
  4283. │ local: overview.dat remote: overview.dat                      │
  4284. │ 884 bytes received in 0.04 seconds (22 Kbytes/s)              │
  4285. │ ftp>                                                          │
  4286. └───────────────────────────────────────────────────────────────┘
  4287.  
  4288. Messages 200, 125, and 226 let you know that the file transferred
  4289. properly.  The next line shows the local-filename, in this case
  4290. we didn't specify the local-filename, so the remote-filename and
  4291. the local-filename are the same.  The next line shows the number
  4292. of bytes transferred and the amount of time it took to transfer
  4293. the file.
  4294. CYBER Sample Session:
  4295.  
  4296. ┌───────────────────────────────────────────────────────────────┐
  4297. │ ftp>get prolog8                                               │
  4298. │ 220 COMMAND OKAY.                                             │
  4299. │ 150 FILE STATUS OKAY; ABOUT TO OPEN DATA CONNECTION.          │
  4300. │ 226 CLOSING DATA CONNECTION.                                  │
  4301. │ local: prolog8 remote: prolog8                                │
  4302. │ 41 bytes received in 0.8 seconds (0.05 Kbytes/s)              │
  4303. │ ftp>                                                          │
  4304. └───────────────────────────────────────────────────────────────┘
  4305. 7.3.1  Changing the Local Directory
  4306.  
  4307.  
  4308. The directory on the local computer can be changed to any
  4309. directory you desire.  This is called the working directory. 
  4310. This is the directory where files that are transferred from the
  4311. remote computer will be stored.
  4312.  
  4313. The syntax of the command to change local working directory is as
  4314. follows:
  4315.  
  4316. ╔═══════════════════════════════════════════════════════════════╗
  4317. ║                                                               ║
  4318. ║  Command Format:  lcd [dirname]                               ║
  4319. ║                                                               ║
  4320. ║     dirname - the name of the new local working directory     ║
  4321. ║                                                               ║
  4322. ║    if directory is omitted, the home directory is assumed     ║
  4323. ║                                                               ║
  4324. ╚═══════════════════════════════════════════════════════════════╝
  4325.  
  4326. Sample Session:
  4327.  
  4328. ┌───────────────────────────────────────────────────────────────┐
  4329. │ ftp>lcd /user0/student0                                       │
  4330. │ Local directory now /user0/student0                           │
  4331. │ ftp>                                                          │
  4332. └───────────────────────────────────────────────────────────────┘
  4333.  
  4334. Absolute or relative pathnames can be specified for directory.
  4335. 7.3.2  Listing the Contents
  4336.  
  4337.  
  4338. Any UNIX command can be entered from the FTP utility.  You must
  4339. preface the command with the FTP command that invokes the
  4340. interactive shell.  
  4341.  
  4342. The syntax to invoke the interactive shell is as follows:
  4343.  
  4344. ╔═══════════════════════════════════════════════════════════════╗
  4345. ║                                                               ║
  4346. ║  Command Format:  ! [command [arguments]]                     ║
  4347. ║                                                               ║
  4348. ║     command - any valid UNIX command, if omitted the          ║
  4349. ║               interactive shell is invoked                    ║
  4350. ║                                                               ║
  4351. ║   arguments - if supplied are arguments to the UNIX command   ║
  4352. ║                                                               ║
  4353. ╚═══════════════════════════════════════════════════════════════╝
  4354.  
  4355.  
  4356. If arguments are provided, the first argument is considered to be
  4357. the UNIX command and the remaining arguments are considered to be
  4358. arguments to that command.
  4359.  
  4360.  
  4361. Example:
  4362.  
  4363. .................................................................
  4364. . ftp>!ls -la                                                   .
  4365. .................................................................
  4366.  
  4367.  
  4368. This command will display the contents of the local working
  4369. directory.  The l option specifies the 'long' listing, and the a
  4370. option requests all files including the initialization files.
  4371. 7.4  Remote Computer Commands
  4372.  
  4373.  
  4374. From the FTP prompt, you can issue commands to the remote
  4375. computer to display files or show the contents of the remote
  4376. directory.  Recall that the commands you enter are FTP commands;
  4377. and although they look like UNIX commands, they are not.
  4378.  
  4379. Transferring file(s) from the Multimax to the remote computer is
  4380. accomplished with the following command: 
  4381.  
  4382. ╔═══════════════════════════════════════════════════════════════╗
  4383. ║                                                               ║
  4384. ║  Command Format:  put <local-file> [remote-file]              ║
  4385. ║                                                               ║
  4386. ║      local-file   - the filename on the local computer        ║
  4387. ║                                                               ║
  4388. ║      remote-file  - the filename on the remote computer       ║
  4389. ║                                                               ║
  4390. ╚═══════════════════════════════════════════════════════════════╝
  4391.  
  4392. This FTP command will retrieve the local-file, transfer it to the
  4393. remote computer, and store it in the remote directory.  If the
  4394. remote-file is not specified, the name of the file on the remote
  4395. computer will be the same as it was on the Multimax.  The current
  4396. settings for type, form, mode, and structure will be used during
  4397. the file transfer.
  4398.  
  4399.  
  4400. VAX sample sessions:
  4401.  
  4402. ┌───────────────────────────────────────────────────────────────┐
  4403. │ ftp>put memo                                                  │
  4404. │ 200 PORT Command OK.                                          │
  4405. │ 125 File transfer started correctly                           │
  4406. │ 226 File transfer completed ok                                │
  4407. │ local: memo remote: memo                                      │
  4408. │ 2299 bytes sent in 0.08 seconds (28 Kbytes/s)                 │
  4409. │ ftp>                                                          │
  4410. └───────────────────────────────────────────────────────────────┘
  4411.  
  4412. Messages 200, 125, and 226 let you know that the file transferred
  4413. properly.  The next line shows the local-filename.  In this case,
  4414. we didn't specify the local-filename, so the local-filename and
  4415. the remote-filename are the same.  The next line shows the number
  4416. of bytes sent and the amount of time for the transfer.
  4417. CYBER Sample Session:
  4418.  
  4419. ┌───────────────────────────────────────────────────────────────┐
  4420. │ ftp>put memo                                                  │
  4421. │ 200 COMMAND OKAY.                                             │
  4422. │ 150 FILE STATUS OKAY; ABOUT TO OPEN DATA CONNECTION.          │
  4423. │ 226 CLOSING DATA CONNECTION.                                  │
  4424. │ local:memo remote:memo                                        │
  4425. │ 2299 bytes sent in 0.08 seconds (28 Kbytes/s)                 │
  4426. │ ftp>                                                          │
  4427. └───────────────────────────────────────────────────────────────┘
  4428. 7.4.1  Changing the Remote Directory
  4429.  
  4430.  
  4431. The directory on the remote computer can be changed to any
  4432. directory you want.  This is called the remote working directory.
  4433. This is the directory where files that are sent from the Multimax
  4434. will be stored.
  4435.  
  4436. The syntax for the command to change remote working directory is
  4437. as follows:
  4438.  
  4439. ╔═══════════════════════════════════════════════════════════════╗
  4440. ║                                                               ║
  4441. ║  Command Format:  cd <remote-dirname>                         ║
  4442. ║                                                               ║
  4443. ║      remote-dirname - the name of the new remote working      ║
  4444. ║                       directory                               ║ 
  4445. ║                                                               ║
  4446. ╚═══════════════════════════════════════════════════════════════╝
  4447.  
  4448. VAX Sample Session:
  4449.                                                          
  4450. ┌───────────────────────────────────────────────────────────────┐
  4451. │ ftp>cd d_1131:[gholdaway]                                     │
  4452. │ 200 Working directory changed to D_1131:[GHOLDAWAY]           │
  4453. │ ftp>                                                          │
  4454. └───────────────────────────────────────────────────────────────┘
  4455.  
  4456. You must specify a valid directory on the remote computer.
  4457.  
  4458.  
  4459. CYBER Example:
  4460.  
  4461. .................................................................
  4462. . 502 COMMAND NOT IMPLEMENTED.                                  .
  4463. .................................................................
  4464.  
  4465. The reason this command is not implemented on the CYBER is
  4466. because NOS does not support the idea of directories.
  4467. 7.4.2  Listing the Contents
  4468.  
  4469. ╔═══════════════════════════════════════════════════════════════╗
  4470. ║                                                               ║
  4471. ║  Command Format:  ls [remote-dirname] [local-file]            ║
  4472. ║                                                               ║
  4473. ║      remote-dirname - working directory on remote computer    ║
  4474. ║                                                               ║
  4475. ║      local-file  - local file where the remote-directory      ║
  4476. ║                    contents will be written.  If omitted,     ║
  4477. ║                    the output is sent to the screen.          ║
  4478. ║                                                               ║
  4479. ╚═══════════════════════════════════════════════════════════════╝
  4480.  
  4481. VAX Sample Session:
  4482.  
  4483. ┌───────────────────────────────────────────────────────────────┐
  4484. │ ftp>ls                                                        │
  4485. │ 200 PORT Command OK.                                          │
  4486. │ 125 File transfer started correctly                           │
  4487. │ login.com;13                                                  │
  4488. │ jeff.;1                                                       │
  4489. │ test.com;1                                                    │
  4490. │ 226 File transfer completed ok                                │
  4491. │ 228 bytes received in 0.06 seconds (0.34 Kbytes/s)            │
  4492. │ ftp>                                                          │
  4493. └───────────────────────────────────────────────────────────────┘
  4494.  
  4495. Since no remote directory was specified, the contents of the
  4496. current working directory is transferred and no local file was
  4497. specified, so the output is displayed on the screen.
  4498.  
  4499.  
  4500. CYBER Sample Session:
  4501.  
  4502. ┌───────────────────────────────────────────────────────────────┐
  4503. │ ftp>ls                                                        │
  4504. │ 200 COMMAND OKAY.                                             │
  4505. │ 150 FILE STATUS OKAY; ABOUT TO OPEN DATA CONNECTION.          │
  4506. │ PROLOG8                                                       │
  4507. │ FSEP1A                                                        │
  4508. │ FSEP1                                                         │
  4509. │ FSEP2                                                         │
  4510. │ 226 CLOSING DATA CONNECTION.                                  │
  4511. │ 52 bytes received in 1 seconds (0.05 Kbytes/s)                │
  4512. │ ftp>                                                          │
  4513. └───────────────────────────────────────────────────────────────┘
  4514. 7.5  Closing the Connection
  4515.  
  4516.  
  4517. The current FTP session with the remote server can be terminated
  4518. without leaving FTP.  When the current session is terminated a
  4519. session to another remote FTP server can be initiated.
  4520.  
  4521. ╔═══════════════════════════════════════════════════════════════╗
  4522. ║  Command Format:  close                                       ║
  4523. ╚═══════════════════════════════════════════════════════════════╝
  4524.  
  4525.  
  4526. This command will terminate the current FTP session with the
  4527. remote server and return to the FTP command interpreter.
  4528.  
  4529.  
  4530. VAX Sample Session:
  4531.  
  4532. ┌───────────────────────────────────────────────────────────────┐
  4533. │ ftp>close                                                     │
  4534. │ 221 Goodbye.                                                  │
  4535. │ ftp>                                                          │
  4536. └───────────────────────────────────────────────────────────────┘
  4537.  
  4538.  
  4539. CYBER Sample Session:
  4540.  
  4541. ┌───────────────────────────────────────────────────────────────┐
  4542. │ ftp>close                                                     │
  4543. │ 221 SERVICE CLOSING CONTROL CONNECTION. LOGGED OUT.           │
  4544. │ ftp>                                                          │
  4545. └───────────────────────────────────────────────────────────────┘
  4546. 7.6  Exiting FTP
  4547.  
  4548.  
  4549. When you have finished using FTP, the following command will
  4550. terminate FTP and return control to the shell.
  4551.  
  4552. ╔═══════════════════════════════════════════════════════════════╗
  4553. ║  Command Format:  quit                                        ║
  4554. ╚═══════════════════════════════════════════════════════════════╝
  4555.  
  4556. This command will terminate the current FTP session and exit FTP.
  4557.  
  4558.  
  4559. VAX Sample Session:
  4560.                                                          
  4561. ┌───────────────────────────────────────────────────────────────┐
  4562. │ ftp>quit                                                      │
  4563. │ 221 Goodbye.                                                  │
  4564. │ $                                                             │
  4565. └───────────────────────────────────────────────────────────────┘
  4566.  
  4567.  
  4568. CYBER Sample Session:
  4569.  
  4570. ┌───────────────────────────────────────────────────────────────┐
  4571. │ ftp>quit                                                      │
  4572. │ 221 SERVICE CLOSING CONTROL CONNECTION. LOGGED OUT.           │
  4573. │ $                                                             │
  4574. └───────────────────────────────────────────────────────────────┘
  4575. 7.7  Special FTP Commands
  4576.  
  4577.  
  4578. This section will discuss some FTP commands that are useful in
  4579. using FTP.  They include an on-line help, status, and the !
  4580. character.
  4581.  
  4582. The help command will display all of the FTP commands on the
  4583. screen.
  4584.  
  4585. ╔═══════════════════════════════════════════════════════════════╗
  4586. ║                                                               ║
  4587. ║  Command Format:  help [command]                              ║
  4588. ║                                                               ║
  4589. ║      command  - an FTP command                                ║
  4590. ║                                                               ║
  4591. ║     if omitted, prints a list of all known commands           ║
  4592. ║                                                               ║
  4593. ╚═══════════════════════════════════════════════════════════════╝
  4594.  
  4595. Sample Session:
  4596.  
  4597. ┌───────────────────────────────────────────────────────────────┐
  4598. │ ftp>help get                                                  │
  4599. │ get         receive file                                      │
  4600. │ ftp>                                                          │
  4601. └───────────────────────────────────────────────────────────────┘
  4602.  
  4603.  
  4604. There is a synonym for the help command.  It works in the same
  4605. way as the help command.
  4606.  
  4607. ╔═══════════════════════════════════════════════════════════════╗
  4608. ║  Command Format:  ? [command]                                 ║
  4609. ╚═══════════════════════════════════════════════════════════════╝
  4610.  
  4611.  
  4612. Sample Session:
  4613.  
  4614. ┌───────────────────────────────────────────────────────────────┐
  4615. │ ftp>? put                                                     │
  4616. │ put          send one file                                    │
  4617. │ ftp>                                                          │
  4618. └───────────────────────────────────────────────────────────────┘
  4619. FTP status can be displayed on the screen by entering the
  4620. following command:
  4621.  
  4622. ╔═══════════════════════════════════════════════════════════════╗
  4623. ║  Command Format:  status                                      ║
  4624. ╚═══════════════════════════════════════════════════════════════╝
  4625.  
  4626.  
  4627. Sample Session:
  4628.  
  4629. ┌───────────────────────────────────────────────────────────────┐
  4630. │ ftp>status                                                    │
  4631. │ Connected to ERC830.                                          │
  4632. │ No proxy connection.                                          │
  4633. │ Mode: stream; Type: ascii; Form: non-print; Structure: file   │
  4634. │ Verbose: on; Bell: off; Prompting: on; Globbing: on           │
  4635. │ Store unique: off; Receive unique: off                        │
  4636. │ Case: off; CR stripping: on                                   │
  4637. │ Ntrans: off                                                   │
  4638. │ Nmap: off                                                     │
  4639. │ Hash mark printing: off; Use of PORT cmds: on                 │
  4640. │ ftp>                                                          │
  4641. └───────────────────────────────────────────────────────────────┘
  4642.  
  4643. These are the default settings.  The meaning of these settings
  4644. and how to change them are found in the supplemental material at
  4645. the end of this manual.
  4646.  
  4647. There are a few "bugs" in FTP.
  4648.  
  4649. Correct execution of many FTP commands depends upon the remote
  4650. server.  The VAX server is supplied by The Wollongong Group, Inc.
  4651. If you encounter problems transferring files to/from the
  4652. Multimax, please bring them to the attention of the User Support
  4653. Branch or call the Hotline (FTS 776-4688 or 6-HOTT).
  4654. 7.8  Introducing UMAX TELNET
  4655.  
  4656.  
  4657. TELNET protocol will allow communication with another host.  The
  4658. TELNET protocol can be invoked from either the Annex prompt or
  4659. from the shell prompt while you are logged into the Multimax.  If
  4660. you invoke TELNET while logged into the Multimax, that session
  4661. will continue to be charged at the appropriate rate.  The new
  4662. session to another host will also charge the account.  This means
  4663. you are paying connect charges on both systems.
  4664.  
  4665. The syntax to invoke TELNET is as follows:
  4666.  
  4667. ╔═══════════════════════════════════════════════════════════════╗
  4668. ║                                                               ║
  4669. ║  Command Format:  telnet [host [port]]                        ║
  4670. ║                                                               ║
  4671. ║      host  - the host name                                    ║
  4672. ║                                                               ║
  4673. ║      port  - the port number, if not given, use default       ║
  4674. ║                                                               ║
  4675. ╚═══════════════════════════════════════════════════════════════╝
  4676.  
  4677. Sample Session:
  4678.  
  4679. ┌───────────────────────────────────────────────────────────────┐
  4680. │ $telnet                                                       │
  4681. │ telnet>                                                       │
  4682. └───────────────────────────────────────────────────────────────┘
  4683.  
  4684. The telnet> prompt indicates that telnet commands can now be
  4685. entered.  If no parameters are given, telnet enters the command
  4686. mode.
  4687.  
  4688. In order to create a connection to another host from command
  4689. mode, use the open command.
  4690.  
  4691. ╔═══════════════════════════════════════════════════════════════╗
  4692. ║  Command format:  open <host> [port]                          ║
  4693. ║                                                               ║
  4694. ║     host - host name                                          ║
  4695. ║                                                               ║
  4696. ║     port - port number, optional                              ║
  4697. ╚═══════════════════════════════════════════════════════════════╝
  4698. Sample session:
  4699.  
  4700. ┌───────────────────────────────────────────────────────────────┐
  4701. │ telnet>open erc830                                            │
  4702. │ Trying...                                                     │
  4703. │ Connected to erc830.                                          │
  4704. │ Escape character is '^]'.                                     │
  4705. │                                                               │
  4706. │ (Warning message from VAX)                                    │
  4707. │                                                               │
  4708. │ Username:                                                     │
  4709. └───────────────────────────────────────────────────────────────┘
  4710.  
  4711. If you enter the host name on the same command line as telnet,
  4712. the open command will be done for you.
  4713.  
  4714.  
  4715. Sample Session:
  4716.  
  4717. ┌───────────────────────────────────────────────────────────────┐
  4718. │ $telnet erc830                                                │
  4719. │ Trying...                                                     │
  4720. │ Connected to erc830.                                          │
  4721. │ Escape character is '^]'.                                     │
  4722. │                                                               │
  4723. │ ( Warning message from VAX)                                   │
  4724. │                                                               │
  4725. │ Username:                                                     │
  4726. └───────────────────────────────────────────────────────────────┘
  4727.  
  4728. When you logout of the destination host, you will be
  4729. automatically brought back to the originating host. 
  4730.  
  4731.  
  4732. Sample Session:
  4733.  
  4734. ┌───────────────────────────────────────────────────────────────┐
  4735. │ $lo                                                           │
  4736. │ Connection closed by foreign host .L-1990 15:57:42.19         │
  4737. │ $                                                             │
  4738. └───────────────────────────────────────────────────────────────┘
  4739. The first $ prompt is the VMS prompt.  The lo command logs you
  4740. out of the VAX.  Notice that we get the connection closed
  4741. message, and the next $ prompt is back to the Multimax.
  4742. The connection that was created was closed.  There is a TELNET
  4743. command to close the connection as well.
  4744.  
  4745. ╔═══════════════════════════════════════════════════════════════╗
  4746. ║  Command Format:  close                                       ║
  4747. ╚═══════════════════════════════════════════════════════════════╝
  4748.  
  4749. This TELNET command will close the connection and return to the
  4750. TELNET command mode.
  4751.  
  4752. To exit TELNET, enter the following command at the telnet>
  4753. prompt.
  4754.      
  4755. ╔═══════════════════════════════════════════════════════════════╗
  4756. ║  Command Format:  quit                                        ║
  4757. ╚═══════════════════════════════════════════════════════════════╝
  4758.  
  4759. This command will close any open TELNET session and exit TELNET. 
  4760. An end-of-file (in command mode) will also close a session and
  4761. exit.
  4762.  
  4763. The current status of TELNET can be shown by entering the
  4764. following command:
  4765.  
  4766. ╔═══════════════════════════════════════════════════════════════╗
  4767. ║  Command Format:  status                                      ║
  4768. ╚═══════════════════════════════════════════════════════════════╝
  4769.  
  4770.  
  4771. Sample Session:
  4772.  
  4773. ┌───────────────────────────────────────────────────────────────┐
  4774. │ telnet>status                                                 │
  4775. │ Connected to erc830.                                          │
  4776. │ Operating in character-at-a-time mode.                        │
  4777. │ Escape character is '^]'.                                     │
  4778. │                                                               │
  4779. │ telnet>                                                       │
  4780. └───────────────────────────────────────────────────────────────┘
  4781. A listing of TELNET commands can be displayed by entering the
  4782. following command at the TELNET command mode prompt telnet>:
  4783.  
  4784. ╔═══════════════════════════════════════════════════════════════╗
  4785. ║  Command Format:  help                                        ║
  4786. ║                                                               ║
  4787. ║                   ?                                           ║
  4788. ╚═══════════════════════════════════════════════════════════════╝
  4789.  
  4790.  
  4791. Sample Session:
  4792.  
  4793. ┌───────────────────────────────────────────────────────────────┐
  4794. │ telnet>help                                                   │
  4795. │ Commands may be abbreviated. Commands are:                    │
  4796. │                                                               │
  4797. │ close     close current connection                            │
  4798. │ display   display operating parameters                        │
  4799. │ mode      try to enter line-by-line or char-at-a-time mode    │
  4800. │ open      connect to a site                                   │
  4801. │ quit      exit telnet                                         │
  4802. │ send      transmit special characters ('send ?' for more)     │
  4803. │ set       set operating parameters ('set ?' for more)         │
  4804. │ status    print status information                            │
  4805. │ toggle    toggle operating parameters ('toggle ?' for more)   │
  4806. │ z         suspend telnet                                      │
  4807. │ ?         print help information                              │
  4808. │ telnet>                                                       │
  4809. └───────────────────────────────────────────────────────────────┘
  4810. Workshop 7
  4811.  
  4812.  
  4813. This workshop will reinforce your understanding of the topics
  4814. covered in this chapter.  Login to the Multimax with the username
  4815. and password given to you by the instructor.  Each student is to
  4816. complete the entire workshop.  Computer exercises might need to
  4817. be worked as a team.
  4818.  
  4819.  
  4820. COMPUTER EXERCISES
  4821.  
  4822.  
  4823. 1.     Log into the Multimax.
  4824.  
  4825. Questions 2 through 11 have to do with a connection between the
  4826. local computer (Multimax) and the remote computer (VAX).
  4827.  
  4828.  
  4829. 2.     Initialize FTP on the Multimax and create a connection to
  4830.        the VAX.  (Hint: open)
  4831.  
  4832.  
  4833.        What is the remote computer default username? 
  4834.        How can you enter a different username? 
  4835.  
  4836.  
  4837.  
  4838.  
  4839. 3.     What files are on the remote computer's directory?
  4840.        (Hint: If you can't remember the FTP command, how can you                           
  4841.        find out?)
  4842.  
  4843.  
  4844.  
  4845.  
  4846.  
  4847. 4.     What is the default type?  (Hint: status)
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.                                   Continue on the next page
  4855. 5.     Transfer the file "memo" from the Multimax to the VAX.
  4856.        Change the name of the file on the VAX to "memo.doc". 
  4857.  
  4858.  
  4859.  
  4860.  
  4861. 6.     Transfer the file "DATA.MAY" from the VAX to the Multimax.
  4862.        Keep the same filename on both platforms.
  4863.  
  4864.  
  4865.  
  4866.  
  4867. 7.     Without entering it, what FTP command would you enter to
  4868.        change the remote computer working directory to
  4869.        D_1131:[STUDENT]? 
  4870.  
  4871.  
  4872.  
  4873.  
  4874. 8.     Enter the FTP command to list the contents of the local
  4875.        computer working directory. What files are present?
  4876.  
  4877.  
  4878.  
  4879.  
  4880. 9.     Enter the FTP command to list the contents of the remote
  4881.        computer working directory. What files are present?
  4882.  
  4883.  
  4884.  
  4885.  
  4886. 10.    Without entering the command, how would you change the
  4887.        remote working directory to D_1131:[STUDENT1]?
  4888.  
  4889.  
  4890.  
  4891.  
  4892. 11.    What changes would you have to make in order to
  4893.        transfer a binary file from the Multimax to the VAX?
  4894.  
  4895.  
  4896.  
  4897.                                   Continue on the next page
  4898.                                          ** NOTE **
  4899.  
  4900. Questions 12 through 20 have to do with a connection between the
  4901. local computer (Multimax) and the remote computer (CYBER).
  4902.  
  4903.  
  4904. 12.    Close the connection with the VAX and then open a connection
  4905.        to the CYBER.
  4906.  
  4907.  
  4908.  
  4909.  
  4910. 13.    What files are on the remote computer's directory?
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916. 14.    What is the default type?  (Hint: status)
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922. 15.    Transfer the file "memo" from the Multimax to the CYBER.
  4923.        Change the name on the CYBER to a filename of your choice.
  4924.  
  4925.  
  4926.  
  4927.  
  4928. 16.    Transfer the file "MAYDATA" from the CYBER to the Multimax.
  4929.        Keep the same filename on both platforms.
  4930.  
  4931.  
  4932.  
  4933.  
  4934. 17.    Without entering it, what FTP command would you enter to
  4935.        change the remote computer working directory?
  4936.  
  4937.  
  4938.  
  4939.  
  4940. 18.    Enter the FTP command to list the contents of the local
  4941.        computer working directory.
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.                                   Continue on the next page
  4950. 19.    Enter the FTP command to list the contents of the remote
  4951.        computer working directory.
  4952.  
  4953.  
  4954.  
  4955.  
  4956. 20.    Close the connection with the CYBER and exit FTP.
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.                                   Continue on the next page
  5002.                                          ** NOTE **
  5003.  
  5004. The following questions have to do with your understanding of the
  5005. Telnet communications protocol.
  5006.  
  5007.  
  5008. 21.    Enter the command to invoke the Telnet protocol.
  5009.  
  5010.  
  5011.  
  5012.  
  5013.  
  5014. 22.    Open a connection to the VAX.
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020. 23.    Enter a valid username and password.
  5021.  
  5022.  
  5023.  
  5024.  
  5025.  
  5026. 24.    Are you logged into the VAX or the Multimax?
  5027.  
  5028.  
  5029.  
  5030.  
  5031. 25.    Enter the command to exit the VAX. (Hint: logoff)
  5032.  
  5033.  
  5034.  
  5035.  
  5036.  
  5037. 26.    Are you logged into the VAX or the Multimax?
  5038.  
  5039.  
  5040.  
  5041.  
  5042.  
  5043. 27.    Are you confused? Logout of the Multimax and the Annex.
  5044.  
  5045.                                             NOTES
  5046. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5047. 8. INTRODUCTION TO vi
  5048.  
  5049.  
  5050. The vi editor was developed at the University of California,
  5051. Berkeley.  It was originally included as part of BSD UNIX.  It
  5052. became an official part of AT&T UNIX with the release of System
  5053. V.  Before vi was invented, the standard UNIX editor was ed.  The
  5054. ed editor was line oriented and made it difficult to see the
  5055. context of the file being edited.
  5056.  
  5057. The next progression was an editor called ex.  The ex editor had
  5058. some distinct advantages over ed.  It allowed you to display an 
  5059. entire screen of text instead of just one line at a time.  While
  5060. in the ex editor, you could give the command vi (for visual
  5061. mode).  Users used the visual mode so much that developers of ex
  5062. made it possible to use the display editing feature without
  5063. having to enter ex and then vi.  They called the new facility
  5064. simply vi.
  5065.  
  5066. The vi editor does its work in a work buffer.  When you start vi,
  5067. it copies the disk file into the work buffer.  During the editing
  5068. session, changes are made to this copy.  The contents of the disk
  5069. file are not changed until you write the contents of the work
  5070. buffer to the disk file.
  5071.  
  5072. The command to enter the vi editor is:
  5073.  
  5074. ╔═══════════════════════════════════════════════════════════════╗
  5075. ║  Command Format:  vi <file1>                                  ║
  5076. ║                                                               ║
  5077. ║      file1 - the filename to edit                             ║
  5078. ╚═══════════════════════════════════════════════════════════════╝
  5079.                                                                  
  5080. Your screen is cleared, then the first lines of the file are
  5081. displayed, and the cursor is positioned at the top of the screen. 
  5082. The bottom line of your screen is reserved for certain command
  5083. mode activities and for error and status messages and does not
  5084. contain any of the file's text.  If the file already exists, the
  5085. bottom line lists the filename in quotes and the number of lines
  5086. and characters it contains.  If the file is new, "New file" is
  5087. displayed next to the filename.  If the file does not fill an
  5088. entire screen, a tilde (~) character appears in the leftmost
  5089. column of any blank lines.
  5090.  
  5091. By default, you are always in command mode at the start of a vi
  5092. session.  The most common command mode activities are:
  5093.  
  5094.        cursor positioning
  5095.        entering text mode
  5096.        moving, copying, and deleting text
  5097.        storing changes
  5098.        quitting
  5099. Whenever you wish to return to command mode, or are unsure of
  5100. what mode you are in, press the Esc key.
  5101.  
  5102. Esc can be entered any number of times without harm.  The Esc key
  5103. on the VT terminals is the Ctrl-3 combination.  On the PC, it is
  5104. the key marked Esc.
  5105. 8.1  vi: Cursor Positioning
  5106.  
  5107.  
  5108. Below is a list of cursor positioning commands.  Characters are
  5109. not echoed on your screen when one of these commands is executed. 
  5110. The cursor simply moves to the desired location.  If a command is
  5111. not accepted, the cursor remains where it is.  The current line
  5112. is defined as the line on which the cursor currently resides. 
  5113. The letter N is a repeat factor.
  5114.  
  5115.  
  5116. N+            move down N lines from current line.  The cursor can be
  5117.               anyplace on the current line.  When complete, the
  5118.               cursor will be located at the first character on the
  5119.               line N lines down from the current line.
  5120.  
  5121.  
  5122. N-            move up N lines from current line.  The cursor can be
  5123.               anyplace on the current line.  When complete, the
  5124.               cursor will be located on the first character on the
  5125.               line located N lines up from the current line.
  5126.  
  5127. (Ret)         The cursor can be located anyplace on the current line. 
  5128.               The will be on the first character of the next line.
  5129.  
  5130. $             The cursor will move to the end of the current line
  5131.  
  5132. NG            This command will move the cursor to line N.  Default
  5133.               is to move to the last line.
  5134.  
  5135.  
  5136. Ctrl-D        move down 1/2 screen (11 lines)
  5137.  
  5138. Ctrl-U        move up 1/2 screen (11 lines)
  5139.  
  5140.  
  5141. NOTE:         Words are delimited by spaces (ie., a word
  5142.               begins and ends with a space).
  5143.  
  5144.  
  5145. Nw            The cursor will be on the first character of the word
  5146.               located N words from the current word.  The current
  5147.               word is the word where the cursor is located.  The
  5148.               default is to skip to the beginning of the next word.
  5149.  
  5150. Nb            The cursor will be on the first character of the word
  5151.               located N words back from the current word.  The
  5152.               default is to skip back to the beginning of the
  5153.               previous word.
  5154.  
  5155. e             The cursor will skip to the end of the current word.
  5156. The following keys are also defined for moving around the screen:
  5157.  
  5158. h             back one space       
  5159.  
  5160. j             down one line            
  5161.  
  5162. k             up one line           
  5163.  
  5164. l             forward one space               
  5165.  
  5166. The arrow keys will also work.
  5167.  
  5168. CAUTION NOTE:        If you hold the arrow key down to move quickly to
  5169.                      another area of the text, a line might be inserted
  5170.                      into your file.
  5171. 8.2  vi: Text Mode
  5172.  
  5173.  
  5174. Several commands in command mode allow you to enter text.  Once
  5175. the command is entered, all other characters that you type are
  5176. inserted in your text until you press the Esc key. 
  5177.  
  5178.  
  5179. To add text, use:
  5180.  
  5181. I      enter text mode, additional text appears at the beginning of
  5182.        the current line.
  5183.  
  5184. i      enter text mode, additional text appears before the current
  5185.        cursor position.
  5186.  
  5187. A      enter text mode, additional text appears at the end of the                          
  5188.        current line.
  5189.  
  5190. a      enter text mode, additional text appears after the current
  5191.        position.
  5192.  
  5193. O      enter text mode, open a line above the current line.
  5194.  
  5195. o      enter text mode, open a line below the current line.
  5196.  
  5197.  
  5198. To replace text, use:
  5199.  
  5200. R      replace characters until Esc
  5201.  
  5202. r      replace one character at current cursor position, then
  5203.        return to command mode
  5204.  
  5205.  
  5206. To substitute text, use:
  5207.  
  5208. Ns     substitute character for the current N characters until
  5209.        Esc.  Default is to substitute for the current
  5210.        character until Esc.
  5211. 8.3  vi: Deleting Text
  5212.  
  5213.  
  5214. vi commands for deleting text take effect relative to the
  5215. cursor's current position.  Text deletion commands are not echoed
  5216. on your screen.
  5217.  
  5218. Ndd    delete N lines starting at the current line.  The
  5219.        default is to delete the current line.
  5220.  
  5221. Ndw    delete N words starting with the current word.  The
  5222.        default is to delete the current word.
  5223.  
  5224. Nx     delete N characters starting at the current cursor
  5225.        position.  The default is to delete one character.
  5226.  
  5227. D      delete remainder of line
  5228. 8.4  vi: Copying Text
  5229.  
  5230.  
  5231. Copying text is performed using one of the "yank and put" command
  5232. pairs.  The most straight forward command sequence for copying
  5233. is:
  5234.  
  5235.        1.     Yank a word, line, or number of lines.  A copy of the
  5236.               yanked text is stored invisibly.  The original text is 
  5237.               not disturbed.
  5238.  
  5239.        2.     Move the cursor to the desired location.
  5240.  
  5241.        3.     Put the yanked copy into place.
  5242.  
  5243.        4.     Move the cursor to the next block of text you want to                         
  5244.               copy, then go to step 1.
  5245.  
  5246.  
  5247. Here are some yank and put commands:
  5248.  
  5249.  
  5250. NY     yank N lines.  Default is to yank one line.
  5251.  
  5252. Nyw    yank N words.  Default is to yank one word.
  5253.  
  5254. P      put yanked lines above current cursor position
  5255.                                              or 
  5256.        put yanked words before current cursor position
  5257.  
  5258.  
  5259. p      put yanked lines below current cursor position
  5260.                                              or
  5261.        put yanked words after current cursor position
  5262. 8.5  vi: Moving Text
  5263.  
  5264.  
  5265. Moving text from one area to another can be accomplished in
  5266. several different ways.  You can use whichever method is the
  5267. easiest for you to remember.
  5268.  
  5269.        1.     Yank, put, and delete:
  5270.  
  5271.               a.     Yank the desired text.
  5272.  
  5273.               b.     Move the cursor to the new location and then "put"
  5274.                      the "yanked" text into its new location.
  5275.  
  5276.               c.     Move the cursor back to the original text and      
  5277.                      delete it.
  5278.  
  5279.  
  5280.                                              or
  5281.  
  5282.        2.     Delete and put:
  5283.  
  5284.               a.     Delete the desired text 
  5285.  
  5286.               b.     Move the cursor to the new location
  5287.  
  5288.               c.     Use a put command to add the text.
  5289.  
  5290.  
  5291.  
  5292. NOTE:         The delete command stores an invisible copy
  5293.               of the deleted text in a buffer.  This is
  5294.               done so the undo command is capable of
  5295.               restoring the previous command.  That's why
  5296.               it is possible to move that deleted text to
  5297.               another area.
  5298. 8.6  vi: Restoring the Last Change
  5299.  
  5300.  
  5301. The Undo command will reverse the last command you just entered. 
  5302. It will restore text that you have changed or deleted by mistake. 
  5303. The undo command will undo only the most recently changed text.
  5304.  
  5305. ╔═══════════════════════════════════════════════════════════════╗
  5306. ║  Command Format:  u                                           ║
  5307. ║                                                               ║
  5308. ║    u - undo the last change                                   ║
  5309. ║                                                               ║
  5310. ║      U - restore the current line to the way it was before you  ║
  5311. ║        started changing it, even if several changes were made ║
  5312. ║                                                               ║
  5313. ╚═══════════════════════════════════════════════════════════════╝
  5314.  
  5315. If you delete a line and then change a word, undo will restore
  5316. the changed word but will not restore the line.
  5317. 8.7  vi: Recovering Text After a Crash
  5318.  
  5319.  
  5320. You can often recover text that would have been lost because of a
  5321. system crash.  When the system has been brought back up enter the
  5322. following command to see if the system saved a copy of your work
  5323. buffer:
  5324.  
  5325.  
  5326. Example:
  5327.  
  5328. .................................................................
  5329. . $vi -r filename                                               .
  5330. .................................................................
  5331.  
  5332.  
  5333. If your work buffer was saved, you will be editing a recent copy
  5334. of the work buffer.  Use the w command to write the edited
  5335. version to the disk file.
  5336.  
  5337. The -r option will recover the version of filename that was in
  5338. the buffer when the crash occurred.  If no buffer was saved, the
  5339. editor will assume you are going to edit a new empty file called
  5340. filename.
  5341. 8.8  vi: Saving Text and Quitting
  5342.  
  5343.  
  5344. Commands to save (write) text and to quit are entered from the
  5345. Last Line Mode.  The Last Line Mode is entered by entering a
  5346. colon (:) character from the command mode.
  5347.  
  5348. To save changes without exiting vi, enter:
  5349.  
  5350.  
  5351. Example:
  5352.  
  5353. .................................................................
  5354. . :w                                                            .
  5355. .................................................................
  5356.  
  5357. This command is displayed on the status line as it is typed in. 
  5358. The commands are executed by pressing the Enter key.  The file's
  5359. name and number of lines and characters are displayed on the
  5360. status line.  With no option, the work buffer will be written
  5361. back to the original disk file.  If, for some reason, you don't
  5362. have write permission to the working directory, you can copy the
  5363. work buffer to another file by specifying the complete pathname
  5364. of a temporary file.
  5365.  
  5366.  
  5367. Example:
  5368.  
  5369. .................................................................
  5370. . :w /user0/rharding/temp                                       .
  5371. .................................................................
  5372.  
  5373. Now you can exit vi and not lose any of your work.  The editing
  5374. session is saved in the file /user/rharding/temp.
  5375.  
  5376. To exit vi without saving any of the changes since the last :w
  5377. (or to discard all changes if no :w), enter:
  5378.  
  5379.  
  5380. Example:
  5381.  
  5382. .................................................................
  5383. . :q!                                                           .
  5384. .................................................................
  5385.  
  5386. The exclamation mark (!) (in slang, it's a bang) indicates to 
  5387. quit the current editing session, regardless.  If you just enter
  5388. q alone, the editor will warn you that existing changes were not
  5389. saved.  It is difficult to get out of this mode.  Use the
  5390. exclamation mark to indicate do the exit no matter what and not
  5391. save the changes since the last w command.
  5392. To save and quit, enter:
  5393.  
  5394.  
  5395. Example:
  5396.  
  5397. .................................................................
  5398. . :wq                                                           .
  5399. .................................................................
  5400.  
  5401. The w command will write the work buffer to the disk file.  The q
  5402. command will exit the editor.  The shell prompt ($) will be
  5403. displayed after the file has been saved and the editor exited.
  5404. 8.9  Other vi Commands
  5405.  
  5406.  
  5407. To save the file you are editing under a different name, use:
  5408.  
  5409.  
  5410. Example:
  5411.  
  5412. .................................................................
  5413. . :w newfile                                                    .
  5414. .................................................................
  5415.  
  5416. To copy in the contents of another file, position the cursor on
  5417. the last line you want to be above the new text, then execute:
  5418.  
  5419.  
  5420. Example:
  5421.  
  5422. .................................................................
  5423. . :r filename                                                   .
  5424. .................................................................
  5425.  
  5426. The contents of filename will appear on your screen below the
  5427. last cursor position.  The existing text will be moved down.
  5428.  
  5429. To include the output of a shell command (i.e., date) in the file
  5430. you are editing, position the cursor as described above, then
  5431. enter:
  5432.  
  5433.  
  5434. Example:
  5435.  
  5436. .................................................................
  5437. . :r !shell-cmd                                                 .
  5438. .................................................................
  5439.  
  5440. To execute a shell command without including its output in your
  5441. file, enter:
  5442.  
  5443.  
  5444. Example:
  5445.  
  5446. .................................................................
  5447. . :!shell-cmd                                                   .
  5448. .................................................................
  5449.  
  5450. This feature enables you to check man pages or the contents of
  5451. other files without exiting vi.
  5452.                                             NOTES
  5453. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5454. Workshop 8
  5455.  
  5456.  
  5457. This workshop will reinforce your understanding of the topics
  5458. covered in this chapter.  Login to the Multimax with the username
  5459. and password given to you by the instructor.  Each student is to
  5460. complete the entire workshop.  Computer exercises might need to
  5461. be worked as a team.
  5462.  
  5463. 1.     Login to the Multimax.
  5464.  
  5465.  
  5466.  
  5467.  
  5468. 2.     Edit the file rocket.sh .
  5469.      (Hint: vi rocket.sh)
  5470.  
  5471.  
  5472.  
  5473. 3.     Position the cursor at the beginning of line 10.
  5474.  
  5475.  
  5476.  
  5477.  
  5478. 4.     Move the cursor up five lines.
  5479.  
  5480.  
  5481.  
  5482.  
  5483. 5.     Move the cursor to the end of the current line.
  5484.        What vi command did you use?
  5485.  
  5486.  
  5487.  
  5488. 6.     Move the cursor to the first line of the file.
  5489.        What vi command did you use?
  5490.  
  5491.  
  5492.  
  5493. 7.     Move to the end of the file and insert a new line after it
  5494.        that contains the following text:
  5495.  
  5496.        fi
  5497.  
  5498.  
  5499. 8.     Remove all the blank lines from this file.
  5500.  
  5501.  
  5502.  
  5503.                                               
  5504.  
  5505.                                   Continue on the next page
  5506. 9.     Locate the word grop and change it to grep .
  5507.  
  5508.  
  5509.  
  5510.  
  5511.  
  5512. 10.    Add the following text after the last line of the file.
  5513.  
  5514.        rm ./temp$$
  5515.  
  5516.  
  5517.  
  5518.  
  5519. 11.    Now execute the script by typing rocket.sh
  5520.  
  5521.        (Hint: What are the permissions on this file?)
  5522.  
  5523.        If you did the editing correctly fireworks should appear. If 
  5524.        not, compare your script to /user0/teacher/rocket.sh
  5525.  
  5526.        To stop the fireworks enter the interrupt character (CTRL-C)
  5527.  
  5528.  
  5529.  
  5530. 12.    Create a file with a name of your own choice. Insert the
  5531.        output from the UNIX command ls -la .                   Save your change and
  5532.        exit vi.
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538. 13.    Edit the file you just created. Go to the end of the file 
  5539.        and without leaving vi, display a listing of the directory 
  5540.        /user0/teacher. How do you return to the editing session?
  5541.        Did the listing get inserted into your editing session?
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550. 13.    What is the option to recover your changes after a system
  5551.        crash?
  5552.  
  5553.  
  5554.  
  5555.  
  5556.  
  5557. 14.    Logout of the Multimax and the Annex.
  5558. 9.  GETTING HELP
  5559.  
  5560.  
  5561. 9.1  Assist
  5562.  
  5563.  
  5564. The assist command is a menu driven utility that can provide
  5565. information on the following topics:
  5566.  
  5567.        1.     Information on a variety of UNIX topics
  5568.  
  5569.        2.     Tutorials
  5570.  
  5571.        3.     The ability to construct and execute command lines
  5572.  
  5573.        4.     A "pop up" menu for advanced users
  5574.  
  5575.  
  5576. Assist is set up so you do not have to know the exact command
  5577. name in order to get information or use the command.  To execute
  5578. assist enter:
  5579.  
  5580. ╔═══════════════════════════════════════════════════════════════╗
  5581. ║  Command Format:  assist  [name]                              ║
  5582. ║                   assist  [-s]                                ║
  5583. ║                   assist  [-c name]                           ║
  5584. ║                                                               ║
  5585. ║      name  - invoke an assist-supported UNIX system or        ║
  5586. ║              walkthru for name.                               ║
  5587. ║                                                               ║
  5588. ║        -s    - reinvoke the assist setup module to check or     ║
  5589. ║                modify the terminal variable.                    ║
  5590. ║                                                               ║
  5591. ║   -c name  - invoke the version of name that is in the        ║
  5592. ║                current directory.                               ║
  5593. ╚═══════════════════════════════════════════════════════════════╝
  5594. Sample session:
  5595.  
  5596. .................................................................
  5597. . $assist                                                       .
  5598. .................................................................
  5599.  
  5600. The first time assist is executed, assist will automatically
  5601. check your terminal capabilities and then runs a brief tutorial.
  5602. You can run the tutorial again by entering:
  5603.  
  5604.  
  5605. Sample session:
  5606.  
  5607. .................................................................
  5608. . $assist -s                                                    .
  5609. .................................................................
  5610.  
  5611. This command will also allow you to recheck your terminal setup.
  5612.  
  5613. The following is a list of useful assist commands:
  5614.  
  5615.        Ctrl-A               -      assist help
  5616.  
  5617.        Ctrl-O               -      help with current menu
  5618.  
  5619.        Ctrl-Y               -      help with current menu item
  5620.  
  5621.        Ctrl-T               -      call top level menu
  5622.  
  5623.        Ctrl-F               -      call "pop up" menu
  5624.  
  5625.        Ctrl-R               -      go back to previous menu
  5626.  
  5627.        (Ret),Ctrl-N         -      move cursor to next menu item
  5628.  
  5629.        Ctrl-P               -      return cursor to previous item
  5630.        
  5631.        Ctrl-G               -      select (execute) current menu item
  5632.  
  5633.        Ctrl-V               -      clear help message or prompt
  5634.        
  5635.        Ctrl-D               -      exit
  5636.  
  5637.  
  5638. Assist contains information on many, but not all, of the UMAX
  5639. commands.  In addition, not all options and possibilities for
  5640. each command are covered.  For complete information about a UMAX
  5641. command, please use the on-line manual pages.
  5642. 9.2  UNIX Primer Plus
  5643.  
  5644.  
  5645. This manual is intended to be the reference manual for UNIX.  It
  5646. has several handy features.  The inside of the front cover has a
  5647. listing of UNIX command and the page number on which a
  5648. description of the command and its options can be found.  In
  5649. addition, there are some quick reference sheets that can be
  5650. removed from the book and used at your terminal.  The book is
  5651. well written, humorous, and contains a lot of information about
  5652. UNIX.  There might be subtle differences between generic UNIX and
  5653. UMAX.
  5654.  
  5655. Another manual that is a good reference for UNIX is "A Practical
  5656. Guide to UNIX System V" by Mark G. Sobell. 
  5657.  
  5658.  
  5659. 9.3  TAB (Technical Assistance Bulletin)
  5660.  
  5661.  
  5662. The TAB is published monthly and contains current articles and
  5663. helpful hints for the Multimax minicomputers and UNIX in general.
  5664. To be added to the mailing list to receive a FREE subscription,
  5665. contact Gloria Armstrong (FTS) 776-4433 or (303) 236-4433.
  5666.  
  5667.  
  5668.  
  5669. 9.4  Local Support
  5670.  
  5671.  
  5672. If you have a local technical person that is available, try them.
  5673. Some regional offices have a hotline that you can call for
  5674. assistance. 
  5675.  
  5676.  
  5677.  
  5678. 9.5  CCS Hotline
  5679.  
  5680.  
  5681. The is a technical Hotline service available in the Denver
  5682. office.  This service is available to the entire Bureau.  This is
  5683. the fastest way to get your questions answered.  The Hotline
  5684. number is (FTS) 776-HOTT (4688) or Commercial (303) 236-HOTT
  5685. (4688).
  5686. 9.6  CBT (DOS based training for UNIX)
  5687.  
  5688.  
  5689. There is a Computer Based Training course available on a PC in
  5690. the Denver training room.  It runs under DOS and doesn't need to
  5691. be connected to a UNIX machine.  It is easy to use and has
  5692. lessons for the beginning and advanced UNIX user, as well as
  5693. courses in C programming and UNIX system administration.  It can
  5694. also give you instruction about a particular command or topic
  5695. that interests you.
  5696. Workshop 9
  5697.  
  5698.  
  5699. Lucky you! No workshop
  5700.  
  5701.  
  5702.  
  5703. Please complete the...
  5704.  
  5705.                                       Summary Workshop 
  5706.  
  5707.                                              and
  5708.  
  5709.                                       Course Evaluation
  5710.                                             NOTES
  5711. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5712. APPENDIX A:  DENVER OFFICE LOGIN SEQUENCE
  5713.  
  5714.  
  5715.        PRESS Space Bar
  5716.                                                                  
  5717. ┌───────────────────────────────────────────────────────────────┐
  5718. │ WELCOME TO THE B.O.R. NETWORK P/S:B                           │
  5719. │ SYSTEMS PRESENTLY AVAILABLE ARE:                              │
  5720. │                                                               │
  5721. │  **SYSTEM**          **NAME**                                 │
  5722. │                                                               │
  5723. │ VAX 8300'S            VAX                                     │
  5724. │ CYBER/CDCNET F.E.     CDC                                     │
  5725. │ ENCORE/UNIX           MAX                                     │
  5726. │ OUT DIAL              OD                                      │
  5727. │                                                               │
  5728. │ TO SELECT A SYSTEM, ENTER THE SYSTEM                          │
  5729. │ NAME AND CARRIAGE RETURN AT NEXT                              │
  5730. │ PROMPT.                                                       │
  5731. │                                                               │
  5732. │ CHANNEL 04/010. ENTER RESOURCE MAX                            │
  5733. │ CONNECTED TO 04/052                                           │
  5734. └───────────────────────────────────────────────────────────────┘
  5735.  
  5736.  
  5737.        Wait 2 seconds then PRESS (Ret) TWICE
  5738.  
  5739. ┌────────────────────────────────────────────────────────────────────────────────┐
  5740. │                                                                                │
  5741. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  5742. │                                                                                │
  5743. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  5744. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  5745. │ annex: c domax1                                                                │
  5746. │ login: your username(Ret)                                                      │
  5747. │ Password: your password(Ret)                                                   │
  5748. │ UNIX System V Release ax.2.2o ns32332                                          │
  5749. │ domax1                                                                         │
  5750. │ Copyright (c) 1984 AT&T                                                        │
  5751. │ All Rights Reserved                                                            │
  5752. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  5753. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  5754. └────────────────────────────────────────────────────────────────────────────────┘
  5755.  
  5756.                                             NOTES
  5757. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5758. APPENDIX B:  GREAT PLAINS LOGIN SEQUENCE
  5759.  
  5760.  
  5761.        PRESS (Ret)
  5762.  
  5763. ┌────────────────────────────────────────────────────────────────────────────┐
  5764. │ WARNING ****** WARNING ****** WARNING ****** WARNING ****** WARNING        │
  5765. │ PUBLIC LAW 99-474 PROHIBITS UNAUTHORIZED USE OF THIS U.S. GOVERNMENT       │
  5766. │ COMPUTER SYSTEM AND/OR SOFTWARE.  PUNISHMENT INCLUDES FINES AND UP TO      │
  5767. │ 10 YEARS IN PRISON.  REPORT VIOLATIONS TO THE SYSTEM SECURITY OFFICER.     │
  5768. │ WARNING ****** WARNING ****** WARNING ****** WARNING ****** WARNING        │
  5769. │                                                                            │
  5770. │                                                                            │
  5771. │ ENTER RESOURCE  A - BIL640, B - BIL751, OA - BIL630, DEN - DENVER CYBERS   │
  5772. │ FOR STATUS OF COMPUTER SYSTEMS CALL   (406) 657-6828 OR FTS 585-6828       │
  5773. │ FOR EMERGENCY AND AFTER HOURS CALL    (406) 255-6932                       │
  5774. │                                                                            │
  5775. │ CHANNEL 02/035.  ENTER RESOURCE DEN(Ret)                                   │
  5776. │ CONNECTED TO 02/079                                                        │
  5777. │                                                                            │
  5778. │ WELCOME TO THE B.O.R. NETWORK P/S:B                                        │
  5779. │ SYSTEMS PRESENTLY AVAILABLE ARE:                                           │
  5780. │                                                                            │
  5781. │  **SYSTEM**          **NAME**                                              │
  5782. │                                                                            │
  5783. │  VAX 8300'S           VAX                                                  │
  5784. │  CYBER/CDCNET F.E.    CDC                                                  │
  5785. │  CENTER               ASC                                                  │
  5786. │  ENCORE/UNIX          MAX                                                  │
  5787. │  TO SELECT A SYSTEM, ENTER THE SYSTEM                                      │
  5788. │  CARRIAGE RETURN AT NEXT                                                   │
  5789. │  PROMPT.                                                                   │
  5790. │                                                                            │
  5791. │  CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                                   │
  5792. │  CONNECTED TO 06/025                                                       │
  5793. └────────────────────────────────────────────────────────────────────────────┘
  5794.  
  5795.        PRESS (RET) TWICE
  5796.  
  5797. ┌────────────────────────────────────────────────────────────────────────────────┐
  5798. │                                                                                │
  5799. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  5800. │                                                                                │
  5801. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  5802. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  5803. │ annex: c domax1                                                                │
  5804. │ login: your username(Ret)                                                      │
  5805. │ Password: your password(Ret)                                                   │
  5806. │ UNIX System V Release ax.2.2o ns32332                                          │
  5807. │ domax1                                                                         │
  5808. │ Copyright (c) 1984 AT&T                                                        │
  5809. │ All Rights Reserved                                                            │
  5810. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  5811. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  5812. └────────────────────────────────────────────────────────────────────────────────┘
  5813.  
  5814. APPENDIX C:  LOWER COLORADO LOGIN SEQUENCE
  5815.  
  5816.  
  5817. The following operating procedures show how a user gets to Denver
  5818. using the Local Area Network (LAN) in Boulder City, starting with
  5819. the PC prompt:   M:\USERNAME>
  5820.  
  5821.  
  5822.        ENTER PCPLUS(Ret)
  5823.  
  5824. ┌────────────────────────────────────────────────────────────────┐         
  5825. │                        |                                       │      
  5826. │ COMMUNICATION SERVICES |     PROCOMM PLUS ADD SERVICES MENU    │      
  5827. │     ON NETWORK         |                                       │      
  5828. │                        |                                       │      
  5829. │ GENERAL SPECIFIC SERVER| UP/DOWN ARROW ..Highlight Services    │      
  5830. │________________________|                                       │      
  5831. │ MICOM      *       *   | ENTER ....Connect Highlighted Services│      
  5832. │ VAX_19.2   *       *   |                                       │      
  5833. │ MI24       *       *   | PgPd .....Scroll Up One Page          │      
  5834. │ ADMICOM    *       *   |                                       │      
  5835. │                        | PgPn .....Scroll Down One Page        │      
  5836. │                        |                                       │      
  5837. │                        | Home .....First Service               │      
  5838. │                        |                                       │      
  5839. │                        | End ......Last Service                │      
  5840. │                        |                                       │ 
  5841. │                        | Alt-E ....Expand/Contract Services    │ 
  5842. │                        |                                       │ 
  5843. │                        | Alt-M ....Manual Connect              │ 
  5844. │                        |                                       │ 
  5845. │                        | Alt-X ....Exit PROCOMM PLUS           │ 
  5846. │                        |                                       │ 
  5847. │                        | Alt-Z ....Help                        │ 
  5848. └────────────────────────────────────────────────────────────────┘ 
  5849.  
  5850.  
  5851.        SELECT MICOM.  PRESS (Ret) SEVERAL TIMES 
  5852.  
  5853. ┌───────────────────────────────────────────────────────────────┐
  5854. │   THIS IS THE LOWER COLORADO REGIONAL OFFICE INSTANET 6600    │
  5855. │   RESOURCES AVAILABLE                                         │
  5856. │   BLD460                                                      │
  5857. │   BLD732                                                      │
  5858. │   BLDT50                                                      │
  5859. │   DEN   (1200BPS)                                             │
  5860. │   DEN2  (2400BPS)                                             │
  5861. │   OUTDIAL (1200 BPS)                                          │
  5862. │   TELEBIT (1400 BPS OUTDIAL)                                  │
  5863. │   VAX  (19.2 lines only)                                      │
  5864. │   CHANNEL 02/008. ENTER RESOURCE                              │
  5865. └───────────────────────────────────────────────────────────────┘
  5866.  
  5867.        ENTER DEN(Ret)
  5868.  
  5869. ┌───────────────────────────────────────────────────────────────┐
  5870. │ You are accessing the Denver MICOM through the Boulder City   │
  5871. │ MICOM.  Please remember to hit the break key three times      │
  5872. │ after logging off.  The first DISCONNECTED comes from.  The   │
  5873. │ second DISCONNECTED comes from Boulder City.  This will assure│
  5874. │ that other users can connect when you are finished.           │
  5875. └───────────────────────────────────────────────────────────────┘
  5876.  
  5877.  
  5878.        PRESS (Ret) SEVERAL TIMES 
  5879.                                                                  
  5880. ┌───────────────────────────────────────────────────────────────┐
  5881. │   **SYSTEM**                  **NAME**                        │
  5882. │                                                               │
  5883. │   VAX 8300'S                   VAX                            │
  5884. │   CYBER/CDCNET F.E.            CDC                            │
  5885. │   ASC/CORP. CENTER             ASC                            │
  5886. │   ENCORE/UNIX                  MAX                            │
  5887. │                                                               │
  5888. │   TO SELECT A SYSTEM, ENTER THE SYSTEM                        │
  5889. │   NAME AND CARRIAGE RETURN AT NEXT                            │
  5890. │   PROMPT.                                                     │
  5891. │                                                               │
  5892. │   CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                     │
  5893. │   CONNECTED TO 06/025                                         │
  5894. └───────────────────────────────────────────────────────────────┘
  5895.  
  5896.  
  5897.        PRESS (Ret) TWICE
  5898.  
  5899. ┌────────────────────────────────────────────────────────────────────────────────┐
  5900. │                                                                                │
  5901. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  5902. │                                                                                │
  5903. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  5904. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  5905. │ annex: c domax1                                                                │
  5906. │ login: your username(Ret)                                                      │
  5907. │ Password: your password(Ret)                                                   │
  5908. │ UNIX System V Release ax.2.2o ns32332                                          │
  5909. │ domax1                                                                         │
  5910. │ Copyright (c) 1984 AT&T                                                        │
  5911. │ All Rights Reserved                                                            │
  5912. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  5913. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  5914. └────────────────────────────────────────────────────────────────────────────────┘
  5915.  
  5916. APPENDIX D:  MID-PACIFIC LOGIN SEQUENCE
  5917.  
  5918.  
  5919. NETWORK LOGIN PROCEDURE
  5920.  
  5921.  
  5922.        TYPE PCOMN(Ret)
  5923.  
  5924. ┌───────────────────────────────────────────────────────────────┐
  5925. │         ┌─────────────────────────────────────────┐           │
  5926. │ ┌───────┤                 Sacramento Connect Menu         ├─────────┐ │
  5927. │ │       └─────────────────────────────────────────┘         │ │
  5928. │ │                                                           │ │
  5929. │ │                                                           │ │
  5930. │ │       1)  Connect to the Sacramento VAX 8300 (USR)        │ │
  5931. │ │                                                           │ │
  5932. │ │       2)  Connect to the Sacramento VAX 780 (CVOCO)       │ │
  5933. │ │                                                           │ │
  5934. │ │       3)  Connect to the Sacramento ENCORE                │ │
  5935. │ │                                                           │ │
  5936. │ │       4)  Connect to the Sacramento (TCP/IP) NETWORK      │ │
  5937. │ │                                                           │ │
  5938. │ │       5)  Manual Setup/Connections                        │ │
  5939. │ │                                                           │ │
  5940. │ │       D)  Connect to the DENVER Computers                 │ │
  5941. │ │                                                           │ │
  5942. │ │       E)  EXIT to DOS                                     │ │
  5943. │ └───────────────────────────────────────────────────────────┘ │
  5944. └───────────────────────────────────────────────────────────────┘
  5945.  
  5946.  
  5947.        PRESS D(Ret)
  5948.  
  5949. ┌───────────────────────────────────────────────────────────────┐
  5950. │         ┌─────────────────────────────────────────┐           │
  5951. │ ┌───────┤                    Denver Connect Menu          ├─────────┐ │
  5952. │ │       └─────────────────────────────────────────┘         │ │
  5953. │ │                                                           │ │
  5954. │ │                                                           │ │
  5955. │ │       1)  Connect to the Denver VAX 8300 (USR)            │ │
  5956. │ │                                                           │ │
  5957. │ │       2)  Connect to the Denver CYBER AA & EE             │ │
  5958. │ │                                                           │ │
  5959. │ │       3)  Connect to the Denver ENCORE                    │ │
  5960. │ │                                                           │ │
  5961. │ │       4)  Connect to the Denver IBM (FFS)                 │ │
  5962. │ │                                                           │ │
  5963. │ │       5)  Connect to Sacramento Computers                 │ │
  5964. │ │                                                           │ │
  5965. │ │       E)  EXIT to DOS                                     │ │
  5966. │ └───────────────────────────────────────────────────────────┘ │
  5967. └───────────────────────────────────────────────────────────────┘
  5968.        PRESS 3(Ret)
  5969.  
  5970. ┌────────────────────────────────────────────────────────────────────────────┐
  5971. │ hosts                                                                      │
  5972. │    Host Name                System Status  Load Factor    Inet Addr        │
  5973. │    ====================================================================    │
  5974. │    domax0                   up             0.46           137.77.1.2       │
  5975. │    domax1                   up             1.23           137.77.1.3       │
  5976. │    dosun0                   up             1.28           137.77.1.5       │
  5977. │    erc830                   up             0.36           137.77.1.4       │
  5978. │ annex: c domax0                                                            │
  5979. │ login: your username(Ret)                                                  │
  5980. │ Password: your password(Ret)                                               │
  5981. │ UNIX System V Release ax.2.2j ns32332                                      │
  5982. │ domax0                                                                     │
  5983. │ Copyright (c) 1984 AT&T                                                    │
  5984. │ All Rights Reserved                                                        │
  5985. │  ***WARNING***Unauthorized access to/use of this U.S. Government           │
  5986. │           computer is punishable by fine and/or imprisonment. ***WARNING***│
  5987. │                                                                            │
  5988. └────────────────────────────────────────────────────────────────────────────┘
  5989.  
  5990. DEDICATED LINE LOGIN
  5991.  
  5992.  
  5993.        TYPE PCOM(Ret)
  5994.  
  5995.  
  5996.        PRESS (Ret)
  5997.  
  5998. ┌───────────────────────────────────────────────────────────────┐
  5999. │   NAME OF RESOURCE:  DEN(Ret)                                 │
  6000. │                                                               │
  6001. │   **SYSTEM**                  **NAME**                        │
  6002. │                                                               │
  6003. │   VAX 8300'S                   VAX                            │
  6004. │   CYBER/CDCNET F.E.            CDC                            │
  6005. │   ASC/CORP. CENTER             ASC                            │
  6006. │   ENCORE/UNIX                  MAX                            │
  6007. │                                                               │
  6008. │   TO SELECT A SYSTEM, ENTER THE SYSTEM                        │
  6009. │   NAME AND CARRIAGE RETURN AT NEXT                            │
  6010. │   PROMPT.                                                     │
  6011. │                                                               │
  6012. │   CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                     │
  6013. │   CONNECTED TO 06/025                                         │
  6014. └───────────────────────────────────────────────────────────────┘
  6015.  
  6016.  
  6017.        PRESS (Ret) TWICE
  6018.  
  6019. ┌────────────────────────────────────────────────────────────────────────────────┐
  6020. │                                                                                │
  6021. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  6022. │                                                                                │
  6023. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  6024. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  6025. │ annex: c domax1                                                                │
  6026. │ login: your username(Ret)                                                      │
  6027. │ Password: your password(Ret)                                                   │
  6028. │ UNIX System V Release ax.2.2o ns32332                                          │
  6029. │ domax1                                                                         │
  6030. │ Copyright (c) 1984 AT&T                                                        │
  6031. │ All Rights Reserved                                                            │
  6032. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  6033. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  6034. └────────────────────────────────────────────────────────────────────────────────┘
  6035.  
  6036.                                             NOTES
  6037. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  6038. APPENDIX E:  PACIFIC NORTHWEST LOGIN SEQUENCE
  6039.  
  6040.  
  6041.        PRESS (Ret) OR Space Bar
  6042.  
  6043. ┌────────────────────────────────────────────────────────────────────────────┐
  6044. │  *******************************  NOTICE  *******************************  │
  6045. │  USE OF GOVERNMENT  COMPUTER RESOURCES AND DATA IS RESTRICTED TO OFFICIAL  │
  6046. │  GOVERNMENT BUSINESS.  FAILURE TO COMPLY COULD RESULT IN DISCIPLINARY      │
  6047. │  ACTION OR PROSECUTION UNDER FEDERAL LAW.  REPORT UNAUTHORIZED USE OR      │
  6048. │  ACCESS TO THE ADP SECURITY OFFICER AT (208)334-1746 OR (FTS)554-1746.     │
  6049. │                                                                            │
  6050. │  C  =  CYBER                                                               │
  6051. │  H  =  HYDROMET                                                            │
  6052. │  P  =  OUT DIAL                                                            │
  6053. │  V  =  VAX BOISE                                                           │
  6054. │  Y  =  YAKIMA VAX                                                          │
  6055. │                                                                            │
  6056. │  CHANNEL 02/014. ENTER RESOURCE:  C(Ret)                                   │
  6057. │  CONNECTED TO CHANNEL 03/094                                               │
  6058. └────────────────────────────────────────────────────────────────────────────┘
  6059.  
  6060.  
  6061.        PRESS (Ret) TWO OR THREE TIMES 
  6062.  
  6063. ┌───────────────────────────────────────────────────────────────┐
  6064. │    **SYSTEM**                  **NAME**                       │
  6065. │                                                               │
  6066. │    VAX 8300'S                   VAX                           │
  6067. │    CYBER/CDCNET F.E.            CDC                           │
  6068. │    ASC/CORP. CENTER             ASC                           │
  6069. │    ENCORE/UNIX                  MAX                           │
  6070. │                                                               │
  6071. │    TO SELECT A SYSTEM, ENTER THE SYSTEM                       │
  6072. │    NAME AND CARRIAGE RETURN AT NEXT                           │
  6073. │    PROMPT.                                                    │
  6074. │                                                               │
  6075. │    CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                    │
  6076. │    CONNECTED TO 06/025                                        │
  6077. └───────────────────────────────────────────────────────────────┘
  6078.        PRESS (Ret) TWICE
  6079.  
  6080. ┌────────────────────────────────────────────────────────────────────────────────┐
  6081. │                                                                                │
  6082. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  6083. │                                                                                │
  6084. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  6085. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  6086. │ annex: c domax1                                                                │
  6087. │ login: your username(Ret)                                                      │
  6088. │ Password: your password(Ret)                                                   │
  6089. │ UNIX System V Release ax.2.2o ns32332                                          │
  6090. │ domax1                                                                         │
  6091. │ Copyright (c) 1984 AT&T                                                        │
  6092. │ All Rights Reserved                                                            │
  6093. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  6094. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  6095. └────────────────────────────────────────────────────────────────────────────────┘
  6096.  
  6097. APPENDIX F:  UPPER COLORADO LOGIN SEQUENCE
  6098.  
  6099.  
  6100.        PRESS (Ret)
  6101.  
  6102. ┌───────────────────────────────────────────────────────────────┐
  6103. │    Server>  C MICOM2400(Ret)                                  │
  6104. │    Server -010- Session 1 connected.                          │
  6105. └───────────────────────────────────────────────────────────────┘
  6106.  
  6107.  
  6108.        PRESS (Ret)
  6109.  
  6110. ┌───────────────────────────────────────────────────────────────┐
  6111. │    SLC PORT SELECTOR                                          │
  6112. │    CHANNEL 01/091.  ENTER HOST:   DEN(Ret)                    │
  6113. │    CONNECTED TO 01/014.                                       │
  6114. └───────────────────────────────────────────────────────────────┘
  6115.  
  6116.  
  6117.        PRESS (Ret) TWO OR THREE TIMES
  6118.                                                                  
  6119. ┌───────────────────────────────────────────────────────────────┐
  6120. │    **SYSTEM**                  **NAME**                       │
  6121. │                                                               │
  6122. │    VAX 8300'S                   VAX                           │
  6123. │    CYBER/CDCNET F.E.            CDC                           │
  6124. │    ASC/CORP. CENTER             ASC                           │
  6125. │    ENCORE/UNIX                  MAX                           │
  6126. │                                                               │
  6127. │    TO SELECT A SYSTEM, ENTER THE SYSTEM                       │
  6128. │    NAME AND CARRIAGE RETURN AT NEXT                           │
  6129. │    PROMPT.                                                    │
  6130. │                                                               │
  6131. │    CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                    │
  6132. │    CONNECTED TO 06/025                                        │
  6133. └───────────────────────────────────────────────────────────────┘
  6134.        PRESS (Ret) TWICE
  6135.  
  6136. ┌────────────────────────────────────────────────────────────────────────────────┐
  6137. │                                                                                │
  6138. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  6139. │                                                                                │
  6140. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  6141. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  6142. │ annex: c domax1                                                                │
  6143. │ login: your username(Ret)                                                      │
  6144. │ Password: your password(Ret)                                                   │
  6145. │ UNIX System V Release ax.2.2o ns32332                                          │
  6146. │ domax1                                                                         │
  6147. │ Copyright (c) 1984 AT&T                                                        │
  6148. │ All Rights Reserved                                                            │
  6149. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  6150. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  6151. └────────────────────────────────────────────────────────────────────────────────┘
  6152.  
  6153. APPENDIX G:  WASHINGTON OFFICE LOGIN SEQUENCE
  6154.  
  6155.  
  6156.        PRESS Space Bar ONCE OR TWICE 
  6157.  
  6158. ┌───────────────────────────────────────────────────────────────┐
  6159. │    CONNECTED TO 01/044                                        │
  6160. │    WELCOME TO THE B.O.R. NETWORK P/S:C                        │
  6161. │    SYSTEMS PRESENTLY AVAILABLE ARE:                           │
  6162. │                                                               │
  6163. │    **SYSTEM**           **NAME**                              │
  6164. │                                                               │
  6165. │    CYBER SYSTEMS                                              │
  6166. │     (AA OR EE)                                                │
  6167. │    VAX CLUSTER           DEN                                  │
  6168. │                                                               │
  6169. │    OUT-DIAL MODEM        OD                                   │
  6170. │                                                               │
  6171. │    TO SELECT A SYSTEM,ENTER THE SYSTEM                        │
  6172. │    NAME AND CARRIAGE-RETURN AT NEXT                           │
  6173. │    PROMPT.                                                    │
  6174. │                                                               │
  6175. │    CHANNEL 02/026. ENTER RESOURCE  DEN(Ret)                   │
  6176. │    CONNECTED TO 01/051                                        │
  6177. │                                                               │
  6178. │    **SYSTEM**                  **NAME**                       │
  6179. │                                                               │
  6180. │    VAX 8300'S                   VAX                           │
  6181. │    CYBER/CDCNET F.E.            CDC                           │
  6182. │    ASC/CORP. CENTER             ASC                           │
  6183. │    ENCORE/UNIX                  MAX                           │
  6184. │                                                               │
  6185. │    TO SELECT A SYSTEM, ENTER THE SYSTEM                       │
  6186. │    NAME AND CARRIAGE RETURN AT NEXT                           │
  6187. │    PROMPT.                                                    │
  6188. │                                                               │
  6189. │    CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                    │
  6190. │    CONNECTED TO 06/025                                        │
  6191. └───────────────────────────────────────────────────────────────┘
  6192.        PRESS (Ret) TWICE
  6193.  
  6194. ┌────────────────────────────────────────────────────────────────────────────────┐
  6195. │                                                                                │
  6196. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  6197. │                                                                                │
  6198. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  6199. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  6200. │ annex: c domax1                                                                │
  6201. │ login: your username(Ret)                                                      │
  6202. │ Password: your password(Ret)                                                   │
  6203. │ UNIX System V Release ax.2.2o ns32332                                          │
  6204. │ domax1                                                                         │
  6205. │ Copyright (c) 1984 AT&T                                                        │
  6206. │ All Rights Reserved                                                            │
  6207. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  6208. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  6209. └────────────────────────────────────────────────────────────────────────────────┘
  6210.  
  6211. APPENDIX H:  UNIX COMMANDS QUICK REFERENCE
  6212.  
  6213.  
  6214.  
  6215. a > b                                     put the output of command a into
  6216.                                           file b
  6217.  
  6218. a >> b                                    append the output of command a onto
  6219.                                           file b
  6220.  
  6221. a < b                                     take the input of command a from
  6222.                                           file b
  6223.  
  6224. a | c                                     pipe the output of command a to the 
  6225.                                           input of command c
  6226.  
  6227. a &                                       run command a in the background
  6228.  
  6229. assist                                    call up the assist menu for
  6230.                                           information on UMAX commands
  6231.  
  6232. at time < script                          run script at time
  6233.  
  6234. at -l                                     list your at jobs waiting to be
  6235.                                           executed
  6236.  
  6237. at -r xx                                  remove at job xx
  6238.  
  6239. awk '/str1/,/str2/' file                  display all lines between those    
  6240.                                           containing str1 and str2
  6241.  
  6242. awk '{print $n,$m}' file                  display fields n and m of file
  6243.  
  6244. call host                                 connect to a Multimax from an Annex
  6245.  
  6246. cat file                                  display file on the screen
  6247.  
  6248. cat file1 >> file2                        append file1 onto file2
  6249.  
  6250. cd                                        return to your home directory
  6251.  
  6252. cd dir                                    work in directory dir
  6253.  
  6254. chmod perms file                          change permissions on file to perms
  6255.  
  6256. cp file1 file2                            copy file1 to file2
  6257.  
  6258. cp f1 f2 f3 dir                           copy files f1, f2, and f3 into
  6259.                                           directory dir
  6260.  
  6261. csh                                       the C shell
  6262.  
  6263.  
  6264. cu options host                           dial up a remote host
  6265.  
  6266. cut -fx file                              display field x of file
  6267.  
  6268. cut -da -fx file                          use a as a field separator
  6269.  
  6270. diff file 1 file 2                        display differences between file1
  6271.                                           and file2
  6272.  
  6273. echo string                               display string on the terminal
  6274.  
  6275. file file1                                describe file1's type (data, text,
  6276.                                           binary, etc)
  6277.  
  6278. finger user                               display information on user
  6279.  
  6280. ftp                                       interactive remote file transfer
  6281.  
  6282. grep string file                          search for string in file
  6283.  
  6284. grep -c string file                       display only the number of
  6285.                                           occurrences of string
  6286.  
  6287. grep -l string files                      list file names that contain string
  6288.  
  6289. kill %x                                   kill background job x
  6290.  
  6291. ksh                                       the KornShell
  6292.  
  6293. lp -ddest file                            Print file on the printer dest
  6294.  
  6295. ls                                        list the files in the current
  6296.                                           working directory
  6297.  
  6298. ls dir                                    list the files in directory dir
  6299.  
  6300. ls -a                                     include files that begin with a 
  6301.                                           . (period)
  6302.  
  6303. ls -l                                     long listing including permissions, 
  6304.                                           size and ownership
  6305.  
  6306. ls -C                                     list in columns
  6307.  
  6308. ls -ld                                    display detailed information on a
  6309.                                           directory, not its contents
  6310.  
  6311. mailx                                     read mail via interactive mail
  6312.                                           program
  6313.  
  6314. mailx user                                send mail to user
  6315.  
  6316.  
  6317. man command                               display the man pages for command
  6318.  
  6319. mkdir dir                                 create directory dir
  6320.  
  6321. mv file1 file2                            move file1 to file2
  6322.  
  6323. mv f1 f2 f3 dir                           move files f1, f2, and f3 into
  6324.                                           directory dir
  6325.  
  6326. nsh host commands                         execute commands on a remote host
  6327.  
  6328. passwd                                    change your password
  6329.  
  6330. pg file                                   display file on screen at a time
  6331.  
  6332. ps                                        display process status of your
  6333.                                           current session
  6334.  
  6335. ps -u user                                display process for user
  6336.  
  6337. pwd                                       print (current) working directory
  6338.                                                  
  6339. rcp host1:file host2:file                 copy files from one host to another
  6340.  
  6341. rlogin host                               login to a remote host
  6342.  
  6343. rm file                                   remove file
  6344.  
  6345. rm -rdir                                  remove directory dir and contents
  6346.  
  6347. rmdir dir                                 remove directory dir
  6348.  
  6349. ruptime                                   display status of hosts on the
  6350.                                           network
  6351.  
  6352. rwho                                      display information on network
  6353.                                           users
  6354.  
  6355. sed -e "action" file                      use stream editor on file
  6356.  
  6357. sh                                        Bourne shell
  6358.  
  6359. shl                                       the Shell Layer Manager
  6360.  
  6361. sort file                                 perform an alphabetic sort based on
  6362.                                           the first field of file
  6363.  
  6364. sort -n file                              perform a numeric sort based on the
  6365.                                           first field of file
  6366.  
  6367. sort +x file                              sort on field x+1
  6368.  
  6369.  
  6370. sort -ta file                             use a as a field separator
  6371.  
  6372. spell file                                check file for correct spelling
  6373.  
  6374. stty                                      display current stty settings
  6375.  
  6376. stty intr                                 set interrupt character to 
  6377.  
  6378. stty kill                                 set kill character to 
  6379.  
  6380. talk                                      talk with user on your terminal
  6381.  
  6382. talk file                                 display the last 10 lines of file
  6383.  
  6384. telenet host                              connect to a remote host
  6385.  
  6386. telenet annex                             connect to an Annex for use of an
  6387.                                           outbound port
  6388.  
  6389. tr a b file                               in file, change every a to b
  6390.  
  6391. vi file                                   edit file with a full screen editor
  6392.  
  6393. wc file                                   list the number of lines, words and
  6394.                                           characters in file
  6395.  
  6396. write user                                send a message to user's terminal
  6397.  
  6398. uucp file hostpath                        remote copy
  6399. APPENDIX I:  vi COMMANDS QUICK REFERENCE
  6400.  
  6401. Special Commands
  6402.  
  6403. Esc                  return to command mode
  6404.  u                   undo last command
  6405.  .                   repeat last insert, delete or put command
  6406.  
  6407. Saving Text and Quitting
  6408.  
  6409. :w                   write (save) text
  6410. :w newfile           save text to file newfile
  6411. :x,yw newfile        save lines x to y into newfile
  6412. :q!                  quit without saving changes
  6413. :wq                  save text and quit
  6414.  
  6415. Cursor Positioning
  6416.  
  6417. N                    move to line N
  6418. N+                   down N lines
  6419. N-                   up N lines
  6420. ^D                   down one screen
  6421. ^U                   up one screen
  6422. k                    up one line
  6423. j                    down one line
  6424. ^                    beginning of line
  6425. $                    end of line
  6426. Nw                   N words ahead
  6427. Nb                   back N words
  6428. w                    word ahead
  6429. b                    back one word
  6430. e                    end of word
  6431. h                    backspace
  6432. l                    forward one space
  6433. arrow keys           space left or right, go up or down one line
  6434.  
  6435.  
  6436. Searches
  6437.  
  6438. /pattern             search forward for pattern
  6439. ?pattern             search backward for pattern
  6440.  ? or /              repeat the last search
  6441.  
  6442. Deleting Text
  6443.  
  6444. Ndd                  delete N lines
  6445. dd                   delete current line
  6446. D                    delete remainder of line
  6447. Ndw                  delete N words
  6448. dw                   delete current word
  6449. Nx                   delete N characters
  6450. x                    delete one character
  6451.  
  6452. Copying Text
  6453.  
  6454. NY                   yank N lines
  6455. Y                    yank one line
  6456. Nyw                  yank N words
  6457. yw                   yank one word
  6458.  
  6459. P                    put yanked lines above current cursor position, or
  6460.                      put yanked words before current cursor position
  6461.  
  6462. p                    put yanked lines below current cursor position, or
  6463.                      put yanked words after current cursor position
  6464.  
  6465. Entering Text Mode
  6466.  
  6467. I                    enter text mode, additional text appears at the
  6468.                      beginning of the current line
  6469.  
  6470. i                    enter text mode, additional text appears before
  6471.                      the current cursor position
  6472.  
  6473. A                    enter text mode, additional text appears at the
  6474.                      end of the current line
  6475.  
  6476. a                    enter text mode, additional text appears after the
  6477.                      current cursor position.
  6478.  
  6479. O                    enter text mode, open a line above the current
  6480.                      line
  6481.  
  6482. o                    enter text mode, open a line below the current
  6483.                      line
  6484.  
  6485. Replacing and Substituting Text
  6486.  
  6487. r                    replace one character at current cursor position,
  6488.                      then return to command mode
  6489.  
  6490. R                    replace characters until Esc
  6491.  
  6492. s                    substitute characters for the current character
  6493.                      until Esc
  6494.  
  6495. Ns                   substitute characters for the current N characters
  6496.                      until Esc
  6497. Reading in Text
  6498.  
  6499. :r filename          append the contents of filename below the current
  6500.                      cursor position
  6501.  
  6502. :r !shell-cmd        append the output of shell-cmd below the current
  6503.                      cursor position
  6504.  
  6505. Global Operations
  6506.  
  6507. :x,ys/old/new/g
  6508.                      on lines x through y, change old to new
  6509.  
  6510. :x,yg/pattern/d
  6511.                      delete any line from x toy that has the string
  6512.                      pattern 
  6513.                                             NOTES
  6514. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  6515. APPENDIX J:  vi COMMANDS REFERENCE
  6516.  
  6517.  
  6518. NAME
  6519.      vi - screen-oriented (visual) display editor based on ex
  6520.  
  6521. SYNOPSIS
  6522.      vi [ -t tag ] [ -r file ] [ -L ] [ -wn ] [ -R ] [ -x ] [ -C
  6523.      ] [ -ccommand ] file ...
  6524.      view [ -t tag ] [ -r file ] [ -L ] [ -wn ] [ -R ] [ -x ] [
  6525.      -C ] [ -ccommand ] file ...
  6526.      vedit [ -t tag ] [ -r file ] [ -L ] [ -wn ] [ -R ] [ -x ] [
  6527.      -C ] [ -ccommand ] file ...
  6528.  
  6529. DESCRIPTION
  6530.      vi (visual) is a display-oriented text editor based on an
  6531.      underlying line editor ex(1).  It is possible to use the
  6532.      command mode of ex from within vi and vice-versa. The visual
  6533.      commands are described on this manual page; how to set
  6534.      options (like automatically numbering lines and
  6535.      automatically starting a new output line after a carriage
  6536.      return) and all ex(1) line editor commands are described on
  6537.      the ex(1) manual page.
  6538.  
  6539.      When using vi, changes made to the file are reflected in
  6540.      what is displayed on the terminal screen.  The position of
  6541.      the cursor on the screen indicates the position within the
  6542.      file.
  6543.  
  6544. INVOCATION
  6545.      The following invocation options are interpreted by vi:
  6546.  
  6547.      -t tag  Edit the file containing the tag and position the
  6548.              cursor at its definition.  The file (tags)
  6549.              containing the tag is found in the current directory
  6550.              or in /usr/lib/tags.  Below is an example of a tags
  6551.              file:
  6552.  
  6553.                     line /tmp/vi.file   /line/
  6554.                     this /tmp/vi.file   /this/
  6555.  
  6556.              Using "vi -t line", the edited file will be
  6557.              "/tmp/vi.file". The file will be searched for the
  6558.              first occurrence of "line", and the cursor will be
  6559.              placed at "line".
  6560.  
  6561.      -r file Edit file after an editor or system crash.
  6562.              (Recovers the version of file that was in the buffer
  6563.              when the crash occurred.)
  6564.  
  6565.      -L      List the name of all files saved as the result of an
  6566.              editor or system crash.
  6567.  
  6568.      -wn     Set the default window size to n.  This is useful
  6569.              when using the editor over a slow speed line.
  6570.  
  6571.      -R      Readonly mode; the readonly flag is set, preventing
  6572.              accidental overwriting of the file.
  6573.  
  6574.      -x      Encryption option; when used, vi simulates the X
  6575.              command of ex(1) and prompts the user for a key.
  6576.              This key is used to encrypt and decrypt text using
  6577.              the algorithm of crypt(1).  The X command makes an
  6578.              educated guess to determine whether or not text read
  6579.              in is encrypted.  The temporary buffer file is
  6580.              encrypted also, using a transformed version of the
  6581.              key typed in for the -x option.  See crypt(1).
  6582.              Also, see the WARNING section at the end of this
  6583.              manual page.
  6584.  
  6585.      -C      Encryption option, same as the -x option, except
  6586.              that vi simulates the C command of ex(1).  The C
  6587.              command is like the X command of ex(1), except that
  6588.              all text read in is assumed to have been encrypted.
  6589.  
  6590.      -c      command Begin editing by executing the specified
  6591.              editor command (usually a search or positioning
  6592.              command).
  6593.  
  6594.      The file argument indicates one or more files to be edited.
  6595.  
  6596.      The view invocation is the same as vi except that the
  6597.      readonly flag is set.
  6598.  
  6599.      The vedit invocation is intended for beginners.  It is the
  6600.      same as vi except that the report flag is set to 1, the
  6601.      showmode and novice flags are set, and magic is turned off.
  6602.      These defaults make it easier to learn vi.
  6603.  
  6604. VI MODES
  6605.      Command  Normal and initial mode.  Other modes return to
  6606.      command mode upon completion.  ESC (escape) is used
  6607.      to cancel a partial command.
  6608.  
  6609.      Input    Entered by setting the following options: a i A I o
  6610.               O c s R.  Arbitrary text may then be entered.
  6611.               Input mode is normally terminated with ESC
  6612.               character, or abnormally with interrupt.
  6613.  
  6614.      Last line
  6615.               Reading input for : / ? or !; terminate with  CR to
  6616.               execute, interrupt to cancel.
  6617. COMMAND SUMMARY
  6618.      In the descriptions, CR stands for carriage return and ESC
  6619.      stands for the escape key.
  6620.  
  6621.    Sample Commands
  6622.  
  6623.      <- | | ->           arrow keys move the cursor
  6624.      h j k l             same as arrow keys
  6625.      itextESC            insert text
  6626.      cwnewESC            change word to new
  6627.      easESC              pluralize word (end of word; append s;
  6628.                          escape from input state)
  6629.      x                   delete a character
  6630.      dw                  delete a word
  6631.      dd                  delete a line
  6632.      3dd                 delete 3 lines
  6633.      u                   undo previous change
  6634.      ZZ                  exit vi, saving changes
  6635.      :q!CR               quit, discarding changes
  6636.      /textCR             search for text
  6637.      U D                 scroll up or down
  6638.      :ex cmdCR           any ex or ed command
  6639.  
  6640.    Counts Before vi Commands
  6641.      Numbers may be typed as a prefix to some commands.  They are
  6642.      interpreted in one of these ways:
  6643.  
  6644.      line/column number  z G |
  6645.      scroll amount       D U
  6646.      repeat effect       most of the rest
  6647.  
  6648.    Interrupting, Canceling
  6649.      ESC                 end insert or incomplete cmd
  6650.      DEL                 (delete or rubout) interrupts
  6651.      L                   reprint screen if DEL scrambles it
  6652.      R                   reprint screen if L is -> key
  6653.  
  6654.    File Manipulation
  6655.      ZZ                  if file is modified, write and exit;
  6656.                          otherwise, exit
  6657.      :wCR                write back changes
  6658.      :w!CR               forced write, if permission originally
  6659.                          not valid
  6660.      :qCR                quit
  6661.      :q!CR               quit, discard changes
  6662.      :e nameCR           edit file name
  6663.      :e!CR               reedit, discard changes
  6664.      :e + nameCR         edit, starting at end
  6665.      :e +n filename CR   edit starting at line n
  6666.      :e #CR              edit alternate file
  6667.      :e! #CR             edit alternate file, discard changes
  6668.      :w nameCR           write file name
  6669.  
  6670.      :w! nameCR          overwrite file name
  6671.      :shCR               run shell, then return
  6672.      :!cmdCR             run cmd, then return
  6673.      :nCR                edit next file in arglist
  6674.      :n argsCR           specify new arglist
  6675.      G                   show current file and line
  6676.      :ta tagCR           to tag file entry tag
  6677.  
  6678.      In general, any ex or ed command (such as substitute or
  6679.      global) may be typed, preceded by a colon and followed by a
  6680.      CR.
  6681.  
  6682.    Positioning Within File
  6683.      F                   forward screen
  6684.      B                   backward screen
  6685.      D                   scroll down half screen
  6686.      U                   scroll up half screen
  6687.      Ng                  go to the beginning of the specified
  6688.                          line (end default), where n is a line
  6689.                          number
  6690.      /pat                next line matching pat
  6691.      ?pat                prev line matching pat
  6692.      n                   repeat last / or ? command
  6693.      N                   reverse last / or ? command
  6694.      /pat/+n             nth line after pat
  6695.      ?pat?-n             nth line before pat
  6696.      ]]                  next section/function
  6697.      [[                  previous section/function
  6698.      (                   beginning of sentence
  6699.      )                   end of sentence
  6700.      {                   beginning of paragraph
  6701.      }                   end of paragraph
  6702.      %                   find matching ( ) { or }
  6703.  
  6704.    Adjusting The Screen
  6705.      L                   clear and redraw
  6706.      zCR                 clear and redraw window if ^L is -> key
  6707.      ZCR                 redraw screen with current line at top
  6708.                          of window
  6709.      z-CR                redraw screen with current line at
  6710.                          bottom of window
  6711.      z.CR                redraw screen with current line at
  6712.                          center of window
  6713.      /pat/z-CR           move pat line to bottom of window
  6714.      zn.CR               use n line window
  6715.      E                   scroll window down 1 line
  6716.      Y                   scroll window up 1 line
  6717.    Marking and Returning
  6718.      ``                  move cursor to previous context
  6719.      ''                  move cursor to first non-white space in
  6720.                          line
  6721.      mx                  mark current position with the ACSII
  6722.                          lower-case letter x
  6723.      `x                  move cursor to mark x
  6724.      'x                  move cursor to first non-white space in
  6725.                          line marked by x
  6726.  
  6727.    Line Positioning
  6728.      H                   top line on screen
  6729.      L                   last line on screen
  6730.      M                   middle line on screen
  6731.      +                   next line, at first non-white
  6732.      -                   previous line, at first non-white
  6733.      CR                  return, same as +
  6734.      | or j              next line, same column
  6735.      | or k              previous line, same column
  6736.  
  6737.    Character Positioning
  6738.      first non-white-space character
  6739.      0                   beginning of line
  6740.      $                   end of line
  6741.      l or ->             forward
  6742.      h or <-             backwards
  6743.      H                   same as <- (backspace)
  6744.      space               same as -> (space bar)
  6745.      fx                  find next x
  6746.      Fx                  find previous x
  6747.      tx                  move to character prior to next x
  6748.      Tx                  move to character following previous x
  6749.      ;                   repeat last f F
  6750.      ,                   repeat last t T
  6751.      n|                  to specified column
  6752.      %                   find matching () { or }
  6753.  
  6754.    Words, Sentences, Paragraphs
  6755.      w                   forward a word
  6756.      b                   back a word
  6757.      e                   end of word
  6758.      )                   to next sentence
  6759.      }                   to next paragraph
  6760.      (                   back a sentence
  6761.      {                   back a paragraph
  6762.      W                   forward a blank-delimited word
  6763.      B                   back a blank-delimited word
  6764.      E                   to end of a blank-delimited word
  6765.    Corrections During Insert
  6766.      H                   erase last character (backspace)
  6767.      W                   erase last word
  6768.      erase               erase, same as H
  6769.      kill                kill, erase this line of input
  6770.      \                   quotes H, erase and kill characters
  6771.      ESC                 ends insertion, back to command mode
  6772.      DEL                 interrupt, terminates insert mode
  6773.      D                   backtab one character; reset left margin
  6774.                          of autoindent
  6775.      |D                  caret () followed by control-d (D);
  6776.                          backtab to beginning of line; do not
  6777.                          reset left margin of autoindent
  6778.      0D                  backtab to beginning of line; reset left
  6779.                          margin of autoindent
  6780.      V                   quote non-printable character
  6781.  
  6782.    Insert and Replace
  6783.      a                   append after cursor
  6784.      A                   append at end of line
  6785.      i                   insert before cursor
  6786.      I                   insert before first non-blank
  6787.      o                   open line below
  6788.      O                   open above
  6789.      rx                  replace single char with x
  6790.      RtextESC            replace characters
  6791.  
  6792.    Operators
  6793.      Operators are followed by a cursor motion, and affect all
  6794.      text that would have been moved over.  For example, since w
  6795.      moves over a word, dw deletes the word.  Double the
  6796.      operator, e.g., dd to affect whole lines.
  6797.  
  6798.      d                   delete
  6799.      c                   change
  6800.      y                   yank lines to buffer
  6801.      <                   left shift
  6802.      >                   right shift
  6803.      !                   filter through command
  6804.  
  6805.    Miscellaneous Operations
  6806.      C                   change rest of line (c$)
  6807.      D                   delete rest of line (d$)
  6808.      s                   substitute chars (cl)
  6809.      S                   substitute lines (cc)
  6810.      J                   join lines
  6811.      x                   delete characters (dl)
  6812.      X                   ... before cursor (dh)
  6813.      Y                   yank lines (yy)
  6814.    Yank and Put
  6815.      Put inserts the text most recently deleted or yanked;
  6816.      however, if a buffer is named (using the ASCII lower-case
  6817.      letters a - z), the text in that buffer is put instead.
  6818.  
  6819.      3yy                 yank 3 lines
  6820.      3yl                 yank 3 characters
  6821.      p                   put back text after cursor
  6822.      P                   put back text before cursor
  6823.      "xp                 put from buffer x
  6824.      "xY ("xyy)          yank to buffer x
  6825.      "xD ("xdd)          delete into buffer x
  6826.  
  6827.    Undo, Redo, Retrieve
  6828.      u                   undo last change
  6829.      U                   restore current line
  6830.      .                   repeat last change
  6831.      "dp                 retrieve d'th last delete
  6832.  
  6833. AUTHOR
  6834.      vi and ex were developed by The University of California,
  6835.      Berkeley California, Computer Science Division, Department
  6836.      of Electrical Engineering and Computer Science.
  6837.  
  6838. FILES
  6839.      /tmp                     default directory where temporary
  6840.                               work files are placed; it can be
  6841.                               changed using the directory option
  6842.                               (see the ex(1) set command)
  6843.      /usr/lib/terminfo/?/*    compiled terminal description
  6844.                               database
  6845.      /usr/lib/.COREterm/?/*   subset of compiled terminal
  6846.                               description database, supplied on
  6847.                               hard disk
  6848.  
  6849. NOTES
  6850.      Two options, although they continue to be supported, have
  6851.      been replaced in the documentation by options that follow
  6852.      the Command Syntax Standard (see intro(1)).  A -r option
  6853.      that is not followed with an option-argument has been
  6854.      replaced by -L and +command has been replaced by -c command.
  6855.  
  6856. SEE ALSO
  6857.      ed(1), ex(1).
  6858.      "Screen Editor Tutorial (vi)" in the UMAX V User's Guide.
  6859.  
  6860. WARNING
  6861.      The encryption options are provided with the Security
  6862.      Administration Utilities package, which is available only in
  6863.      the United States.
  6864.      Tampering with entries in /usr/lib/.COREterm/?/* or
  6865.      /usr/lib/terminfo/?/* (for example, changing or removing an
  6866.      entry) can affect programs such as vi(1) that expect the
  6867.      entry to be present and correct.  In particular, removing
  6868.      the "dumb" terminal may cause unexpected problems.
  6869.  
  6870. BUGS
  6871.      Software tabs using T work only immediately after the
  6872.      autoindent.
  6873.  
  6874.      Left and right shifts on intelligent terminals do not make
  6875.      use of insert and delete character operations in the
  6876.      terminal.
  6877. APPENDIX K:  ftp COMMANDS REFERENCE
  6878.  
  6879.  
  6880. NAME
  6881.      ftp - Internet file transfer program 
  6882.  
  6883. SYNOPSIS
  6884.      ftp [ -v ] [ -d ] [ -i ] [ -n ] [ -g ] [ host ]
  6885.                                                     
  6886. DESCRIPTION                                         
  6887.      ftp is the user interface to the DARPA File Transfer
  6888.      Protocol. The program transfers files to and from a remote
  6889.      network site.                                             
  6890.                                                                
  6891.      The client host with which ftp is to communicate can be   
  6892.      specified on the command line. In this case, ftp immediately
  6893.      attempts to establish a connection to an FTP server on that 
  6894.      host; otherwise, ftp enters its command interpreter and     
  6895.      waits for instruction, displaying the prompt ftp>.          
  6896.                                                                  
  6897.      ftp recognizes the following commands:                      
  6898.                                                                  
  6899.      ! [ command [ args ] ]                                      
  6900.                Invoke an interactive shell on the local machine. 
  6901.                If there are arguments, the first is taken to be a
  6902.                command to execute directly, with the rest of the 
  6903.                arguments as its arguments.                       
  6904.                                                                  
  6905.      $ macro-name [ args ]                                       
  6906.                Execute the macro-name that was defined with      
  6907.                the macdef command.  Arguments are passed to the  
  6908.                macro unglobbed.                                  
  6909.                                                                  
  6910.      account [ passwd ]                                          
  6911.                Supply a supplemental password required by a      
  6912.                remote system for access to resources once a login
  6913.                has been successfully completed.  If no argument  
  6914.                is included, the user will be prompted for an     
  6915.                account password in a non-echoing input mode.     
  6916.                                                                  
  6917.      append local-file [ remote-file ]                           
  6918.                Append a local file to a file on the remote       
  6919.                machine. If remote-file is left unspecified, the  
  6920.                local file name is used to name the remote file   
  6921.                after being altered by any ntrans or nmap setting.
  6922.                File transfer uses the current settings for type, 
  6923.                format, mode, and structure.                      
  6924.                                                                  
  6925.      ascii     Set the file transfer type to network ASCII. This 
  6926.                is the default type.
  6927.      bell      Sound a bell after each file transfer command is  
  6928.                completed.                                        
  6929.                                                                  
  6930.      binary    Set the file transfer type to support binary image
  6931.                transfer.                                         
  6932.                                                                  
  6933.      bye       Terminate the FTP session with the remote server  
  6934.                and exit ftp.                                     
  6935.                                                                  
  6936.      case      Toggle remote computer file name case mapping     
  6937.                during mget commands.  When case is on (default is
  6938.                off), remote computer file names with all letters 
  6939.                in upper case are written in the local directory  
  6940.                with the letters mapped to lower case.            
  6941.                                                                  
  6942.      cd remote-directory                                         
  6943.                Change the working directory on the remote machine
  6944.                to remote-directory.                              
  6945.                                                                  
  6946.      cdup      Change the remote machine working directory to the
  6947.                parent of the current remote machine working      
  6948.                directory.                                        
  6949.                                                                  
  6950.      close     Terminate the FTP session with the remote server, 
  6951.                and return to the command interpreter.  Any       
  6952.                defined macros are erased.                        
  6953.                                                                  
  6954.      cr        Toggle carriage return stripping during ASCII type
  6955.                file retrieval.  Records are denoted by a carriage
  6956.                return/linefeed sequence during ASCII type file   
  6957.                transfer.  When cr is on (the default), carriage  
  6958.                returns are stripped from this sequence to conform
  6959.                with the UNIX single linefeed record delimiter.   
  6960.                Records on non-UNIX remote systems may contain    
  6961.                single linefeeds; when an ASCII type transfer is  
  6962.                made, these linefeeds may be distinguished from a 
  6963.                record delimiter only when cr is off.             
  6964.                                                                  
  6965.      delete remote-file                                          
  6966.                Delete the file remote-file on the remote machine.
  6967.                                                                  
  6968.      debug [ debug-value ]                                       
  6969.                Toggle debugging mode. If an optional debug-value 
  6970.                is specified, it is used to set the debugging     
  6971.                level. When debugging is on, ftp prints each      
  6972.                command sent to the remote machine, preceded by   
  6973.                the string --> .                                  
  6974.      dir [ remote-directory ] [ local-file ]                     
  6975.                Print the contents of directory, remote-directory,
  6976.                and, optionally, place the output in local-file.  
  6977.                If no directory is specified, the current working 
  6978.                directory on the remote machine is used. If no    
  6979.                local file is specified, or local-file is -,      
  6980.                output comes to the terminal.                     
  6981.                                                                  
  6982.      disconnect                                                  
  6983.                A synonym for close.                              
  6984.                                                                  
  6985.      form format                                                 
  6986.                Set the file transfer form to format.  The default
  6987.                format is file.                                   
  6988.                                                                  
  6989.      get remote-file [ local-file ]                           
  6990.                Retrieve the remote-file and store it on the local
  6991.                machine. If the local file name is not specified, 
  6992.                it is given the same name it has on the remote    
  6993.                machine, subject to alteration by the current     
  6994.                case, ntrans, and nmap settings. The current      
  6995.                settings for type, form, mode, and structure are  
  6996.                used while transferring the file.                 
  6997.                                                                  
  6998.      glob      Toggle filename expansion for mdelete, mget and   
  6999.                mput.  If globbing is turned off with glob, the   
  7000.                file name arguments are taken literally and not   
  7001.                expanded.  Globbing for mput is done as in csh(1).
  7002.                For mdelete and mget, each remote file name is    
  7003.                expanded separately on the remote machine and the 
  7004.                lists are not merged.  Expansion of a directory   
  7005.                name is likely to be different from expansion of  
  7006.                the name of an ordinary file:  the exact result   
  7007.                depends on the foreign operating system and FTP   
  7008.                server, and can be previewed by doing             
  7009.                "mls remote-files -".  Note:  mget and mput are   
  7010.                not meant to transfer entire directory subtrees of
  7011.                files.  That can be done by transferring a tar(1) 
  7012.                archive of the subtree (in binary mode).          
  7013.                                                                  
  7014.      hash      Toggle number-sign (#) printing for each data     
  7015.                block transferred. The size of a data block is    
  7016.                1024 bytes.                                       
  7017.                                                                  
  7018.      help [ command ]                                            
  7019.                Print a description of command.  With no argument,
  7020.                ftp prints a list of the known commands.          
  7021.                                                                  
  7022.      lcd [ directory ]                                           
  7023.                Change the working directory on the local machine.
  7024.                If no directory is specified, changes to the      
  7025.                user's home directory.                            
  7026.  
  7027.      ls [ remote-directory ] [ local-file ]                      
  7028.                Print an abbreviated listing of the contents of a 
  7029.                directory on the remote machine. If remote-       
  7030.                directory is left unspecified, the current working
  7031.                directory is used. If no local file is specified, 
  7032.                the output is sent to the terminal.               
  7033.                                                                  
  7034.      macdef macro-name                                           
  7035.                Define a macro.  Subsequent lines are stored as   
  7036.                the macro macro-name; a null line (consecutive    
  7037.                newline characters in a file or carriage returns  
  7038.                from the terminal) terminates macro input mode.   
  7039.                There is a limit of 16 macros and 4096 total      
  7040.                characters in all defined macros.  Macros remain  
  7041.                defined until a close command is executed.  The   
  7042.                macro processor interprets "$" and "\" as special 
  7043.                characters.  A "$" followed by a number (or       
  7044.                numbers) is replaced by the corresponding argument
  7045.                on the macro invocation command line.  A "$"      
  7046.                followed by an "i" signals that macro processor   
  7047.                that the executing macro is to be looped. On the  
  7048.                first pass "$i" is replaced by the first argument 
  7049.                on the macro invocation command line, on the      
  7050.                second pass it is replaced by the second argument,
  7051.                and so on.  A "\" followed by any character is    
  7052.                replaced by that character.  Use the "\" to       
  7053.                prevent special treatment of the "$".             
  7054.                                                                  
  7055.      mdelete [ remote-files ]                                    
  7056.                Delete the specified files on the remote machine. 
  7057.                                                                  
  7058.      mdir remote-files local-file                             
  7059.                Like dir, except multiple remote files may be     
  7060.                specified.  If interactive prompting is on, ftp   
  7061.                will prompt the user to verify that the last      
  7062.                argument is indeed the target local file for      
  7063.                receiving mdir output.                            
  7064.                                                                  
  7065.      mget remote-files                                           
  7066.                Expand the remote-files on the remote machine and 
  7067.                do a get for each file name thus produced.  See   
  7068.                glob for details on the filename expansion.       
  7069.                Resulting file names will then be processed       
  7070.                according to case, ntrans, and nmap settings.     
  7071.                Files are transferred into the local working      
  7072.                directory, which can be changed with              
  7073.                "lcd directory"; new local directories can be     
  7074.                created with "! mkdir directory".                 
  7075.                                                                  
  7076.      mkdir directory-name                                        
  7077.                Make a directory on the remote machine.
  7078.      mls remote-files local-file                                 
  7079.                Like ls, except multiple remote files may be      
  7080.                specified.  If interactive prompting is on, ftp   
  7081.                will prompt the user to verify that the last      
  7082.                argument is indeed the target local file for      
  7083.                receiving mls output.                             
  7084.                                                                  
  7085.      mode [ mode-name ]                                          
  7086.                Set the file transfer mode to mode-name.  The     
  7087.                default mode is stream.                           
  7088.                                                                  
  7089.      mput local-files                                            
  7090.                Expand wild cards in the list of local files given
  7091.                as arguments and do a put for each file in the    
  7092.                resulting list.  See glob for details of filename 
  7093.                expansion.  Resulting file names will then be     
  7094.                processed according to ntrans and nmap settings.  
  7095.                                                                  
  7096.      nmap [ inpattern outpattern ]                               
  7097.                Set or unset the filename mapping mechanism.  If  
  7098.                no arguments are specified, the filename mapping  
  7099.                mechanism is unset.  If arguments are specified,  
  7100.                remote filenames are mapped during mput commands  
  7101.                and put commands issued without a specified remote
  7102.                target filename.  If arguments are specified,    
  7103.                local filenames are mapped during mget commands  
  7104.                and get commands issued without a specified local
  7105.                target filename.  This command is useful when    
  7106.                connecting to a non-UNIX remote computer with    
  7107.                different file naming conventions or practices.  
  7108.                The mapping follows the pattern set by inpattern 
  7109.                and outpattern.  inpattern is a template for     
  7110.                incoming filenames (which may have already been  
  7111.                processed according to the ntrans and case       
  7112.                settings).  Variable templating is accomplished by
  7113.                including the sequences "$1", "$2", ..., "$9" in  
  7114.                inpattern.  Use "\" to prevent this special       
  7115.                treatment of the "$" character.  All other        
  7116.                characters are treated literally, and are used to 
  7117.                determine the nmap inpattern variable values.  For
  7118.                example, given inpattern $1.$2 and the remote file
  7119.                name mydata.data, $1 would have the value mydata, 
  7120.                and $2 would have the value data.  The outpattern 
  7121.                determines the resulting mapped filename.  The    
  7122.                sequences "$1", "$2", ..., "$9" are replaced by   
  7123.                any value resulting from the inpattern template.  
  7124.                The sequence "$0" is replaced by the original     
  7125.                filename.  Additionally, the sequence             
  7126.                "[seq1,seq2]" is replaced by seq1 if seq1 is not a
  7127.                null string; otherwise it is replaced by seq2.    
  7128.                For example, the command "nmap $1.$2.$3
  7129.                [$1,$2].[$2,file]" would yield the output filename
  7130.                myfile.data for input filenames myfile.data and   
  7131.                myfile.data.old, myfile.file for the input        
  7132.                filename myfile, and myfile.myfile for the input  
  7133.                filename .myfile.  Spaces may be included in      
  7134.                outpattern, as in the example:                    
  7135.                                                                  
  7136.                     nmap $1 | sed "s/  *$//" > $1                
  7137.                                                                  
  7138.                Use the "\" character to prevent special treatment
  7139.                of the "$", "[", "]", and "," characters.         
  7140.                                                                  
  7141.      ntrans [ inchars [ outchars ] ]                             
  7142.                Set or unset the filename character translation   
  7143.                mechanism.  If no arguments are specified, the    
  7144.                filename character translation mechanism is unset.
  7145.                If arguments are specified, characters in remote  
  7146.                filenames are translated during mput commands and 
  7147.                put commands issued without a specified remote    
  7148.                target filename.  If arguments are specified,     
  7149.                characters in local filenames are translated      
  7150.                during mget commands and get commands issued      
  7151.                without a specified local target filename.  This  
  7152.                command is useful when connecting to a non-UNIX   
  7153.                remote computer with different file naming        
  7154.                conventions or practices.  Characters in a        
  7155.                filename matching a character in inchars are      
  7156.                replaced with the corresponding character in      
  7157.                outchars.  If the character's position in inchars 
  7158.                is longer than the length of outchars, the        
  7159.                character is deleted from the file name.          
  7160.                                                                  
  7161.      open host [ port ]                                          
  7162.                Establish a connection to the specified host's FTP
  7163.                server. An optional port number can be supplied,  
  7164.                in which case, ftp attempts to contact an FTP     
  7165.                server at that port. If the auto-login option is  
  7166.                on (default), ftp also attempts to automatically  
  7167.                log the user in to the FTP server (see below).    
  7168.                                                                  
  7169.      prompt    Toggle interactive prompting. Interactive         
  7170.                prompting occurs during multiple file transfers to
  7171.                allow the user to selectively retrieve or store   
  7172.                files. If prompting is turned off (default), any  
  7173.                mget or mput transfers all files and mdelete will 
  7174.                delete all files.
  7175.      proxy ftp-command                                           
  7176.                Execute an ftp command on a secondary control     
  7177.                connection.  This command allows simultaneous     
  7178.                connection to two remote FTP servers for          
  7179.                transferring files between the two servers.  The 
  7180.                first proxy command should be an open, to        
  7181.                establish the secondary control connection.  Enter
  7182.                the command "proxy ?" to see other ftp commands   
  7183.                executable on the secondary connection.  The      
  7184.                following commands behave differently when        
  7185.                prefaced by proxy:  open will not define new      
  7186.                macros during the auto-login process, close will  
  7187.                not erase existing macro definitions, get and mget
  7188.                transfer files from the host on the primary       
  7189.                control connection to the host on the secondary   
  7190.                control connection, and put, mput, and append     
  7191.                transfer files from the host on the secondary     
  7192.                control connection to the host on the primary     
  7193.                control connection.  Third party file transfers   
  7194.                depend upon support of the FTP protocol PASV      
  7195.                command by the server on the secondary control    
  7196.                connection.                                       
  7197.                                                                  
  7198.      put local-file [ remote-file ]                              
  7199.                Store a local file on the remote machine. If      
  7200.                remote-file is left unspecified, the local file   
  7201.                name is used in naming the remote file, after     
  7202.                processing according to any ntrans or nmap        
  7203.                settings.  File transfer uses the current settings
  7204.                for type, format, mode, and structure.            
  7205.                                                                  
  7206.      pwd       Print the name of the current working directory on
  7207.                the remote machine.                               
  7208.                                                                  
  7209.      quit      A synonym for bye.                                
  7210.                                                                  
  7211.      quote arg1 arg2 ...                                         
  7212.                The arguments specified are sent, verbatim, to the
  7213.                remote FTP server.                                
  7214.                                                                  
  7215.      recv remote-file [ local-file ]                             
  7216.                A synonym for get.                                
  7217.                                                                  
  7218.      remotehelp [ command-name ]                                 
  7219.                Request help from the remote FTP server. If a     
  7220.                command-name is specified, it is supplied to the  
  7221.                server as well.                                   
  7222.                                                                  
  7223.      rename [ from ] [ to ]                                      
  7224.                Rename, on the remote machine, the file from to   
  7225.                the file to.
  7226.      reset     Clear reply queue.  This command re-synchronizes  
  7227.                command/reply sequencing with the remote FTP      
  7228.                server.  Resynchronization may be necessary       
  7229.                following a violation of the FTP protocol by the  
  7230.                remote server.                                    
  7231.                                                                  
  7232.      rmdir directory-name                                        
  7233.                Delete a directory on the remote machine.         
  7234.                                                                  
  7235.      runique   Toggle storing of files on the local system with  
  7236.                unique filenames.  If a file already exists with a
  7237.                name equal to the target local filename for a get 
  7238.                or mget command, a ".1" is appended to the name.  
  7239.                If the resulting name matches another existing    
  7240.                file, a ".2" is appended to the original name.  If
  7241.                this process continues up to ".99", an error      
  7242.                message is printed, and the transfer does not take
  7243.                place.  The generated unique filename will be     
  7244.                reported.  Note that runique will not affect local
  7245.                files generated from a shell command (see below). 
  7246.                The default value is off.                         
  7247.                                                                  
  7248.      send local-file [ remote-file ]                             
  7249.                A synonym for put.                                
  7250.                                                                  
  7251.      sendport  Toggle the use of PORT commands. By default, ftp  
  7252.                attempts to use a PORT command when establishing a
  7253.                connection for each data transfer. The use of PORT
  7254.                commands can prevent delays when performing       
  7255.                multiple file transfers.  If the PORT command     
  7256.                fails, ftp uses the default data port. When the   
  7257.                use of PORT commands is disabled, no attempt is   
  7258.                made to use them for each data transfer. This is  
  7259.                useful for certain FTP implementations that do    
  7260.                ignore PORT commands but wrongly indicate they    
  7261.                have been accepted.                               
  7262.                                                                  
  7263.      status    Show the current status of ftp.                   
  7264.  
  7265.      struct [ struct-name ]                                      
  7266.                Set the file transfer structure to struct-name.   
  7267.                The default structure is stream.                  
  7268.                                                                  
  7269.      sunique   Toggle storing of files on remote machine under   
  7270.                unique file names.  Remote FTP server must support
  7271.                 the FTP protocol STOU command for successful    
  7272.                completion.  The remote server will report a     
  7273.                unique name.  Default value is off.              
  7274.                                                                 
  7275.      tenex     Set the file transfer type to that needed to talk
  7276.                to TENEX machines.
  7277.      trace     Toggle packet tracing.                           
  7278.                                                                 
  7279.      type [ type-name ]                                         
  7280.                Set the file transfer type to type-name.  If no  
  7281.                type-name is specified, the current type is      
  7282.                printed. The default type is network ascii.      
  7283.                                                                 
  7284.      user user-name [ password ] [ account ]                    
  7285.                The user identifies him/herself to the remote FTP 
  7286.                server. If the password is not specified and the  
  7287.                server requires it, ftp prompts the user for it   
  7288.                (after disabling local echo).  If an account field
  7289.                is not specified, and the FTP server requires it, 
  7290.                the user is prompted for it. If an account field  
  7291.                is specified, an account command will be relayed  
  7292.                to the remote server after the login sequence is  
  7293.                completed if the remote server did not require it 
  7294.                for logging in.  Unless ftp is invoked with       
  7295.                "auto-login" disabled, this process is done       
  7296.                automatically on initial connection to the FTP    
  7297.                server.                                           
  7298.                                                                  
  7299.      verbose   Toggle verbose mode. In verbose mode, all         
  7300.                responses from the FTP server are displayed to the
  7301.                user. In addition, if verbose is on, when a file  
  7302.                transfer completes, statistics regarding the      
  7303.                efficiency of the transfer are reported. By       
  7304.                default, verbose is on.                           
  7305.                                                                  
  7306.      ? [ command ]                                               
  7307.                A synonym for help.                               
  7308.                                                                  
  7309.      Command arguments that have embedded spaces can be quoted   
  7310.      with double quote (") marks.                                
  7311.                                                                  
  7312. ABORTING A FILE TRANSFER                                         
  7313.      To abort a file transfer, use the terminal interrupt key    
  7314.      (usually <ctrl>C).  Sending transfers will be immediately   
  7315.      halted.  Receiving transfers will be halted by sending a FTP
  7316.      protocol ABOR command to the remote server, and discarding  
  7317.      any further data received.  The speed at which this is      
  7318.      accomplished depends upon the remote server's support for   
  7319.      ABOR processing.  If the remote server does not support the 
  7320.      ABOR command, an ftp> prompt will not appear until the      
  7321.      remote server has completed sending the requested file.     
  7322.                                                                  
  7323.      The terminal interrupt key sequence will be ignored when ftp
  7324.      has completed any local processing and is awaiting a reply  
  7325.      from the remote server.  A long delay in this mode may      
  7326.      result from the ABOR processing described above, or from    
  7327.      unexpected behavior by the remote server, including         
  7328.      violations of the FTP protocol.  If the delay results from  
  7329.      unexpected remote server behavior, the local ftp program    
  7330.      must be killed by hand.                                     
  7331.                                                                  
  7332. FILE NAMING CONVENTIONS                                          
  7333.      Files specified as arguments to ftp commands are processed  
  7334.      according to the following rules.                           
  7335.                                                                  
  7336.      1.   If the file name is -, the standard input (for reading)
  7337.           or the standard output (for writing) is used.          
  7338.                                                                  
  7339.      2.   If the first character of the file name is a bar |, the
  7340.           remainder of the argument is interpreted as a shell    
  7341.           command.  ftp then forks a shell, using popen(3S) with 
  7342.           the argument supplied, and reads (writes) from the     
  7343.           stdout (stdin).  If the shell command includes spaces, 
  7344.           the argument must be quoted; for example, "| ls -lt". A
  7345.           particularly useful example of this mechanism is       
  7346.           "dir | more".                                          
  7347.                                                                  
  7348.      3.   Failing the above checks, if globbing is enabled, local
  7349.           file names are expanded according to the rules used in 
  7350.           the csh(1); see the glob command.  If the ftp command  
  7351.           expects a single local file (e.g., put), only the first
  7352.           filename generated by the globbing operation is used.  
  7353.                                                                  
  7354.      4.   For mget commands and get commands with unspecified    
  7355.           local file names, the local filename is the remote     
  7356.           filename, which may be altered by a case, ntrans, or   
  7357.           nmap setting.  The resulting filename may then be      
  7358.           altered if runique is on.                              
  7359.                                                                  
  7360.      5.   For mput commands and put commands with unspecified    
  7361.           remote file names, the remote filename is the local    
  7362.           filename, which may be altered by a ntrans or nmap     
  7363.           setting.  The resulting filename may then be altered by
  7364.           the remote server if sunique is on.                    
  7365.                                                                  
  7366. FILE TRANSFER PARAMETERS                                         
  7367.      The FTP specification identifies many parameters that can   
  7368.      affect a file transfer. The type can be one of ascii, image 
  7369.      (binary), ebcdic, and local byte size (for PDP-10's and     
  7370.      PDP-20's mostly).  ftp supports the ascii and image types of
  7371.      file transfer, plus local byte size 8 for tenex mode        
  7372.      transfers.                                                  
  7373.                                                                  
  7374.      ftp supports only the default values for the remaining file 
  7375.      transfer parameters:  mode, form, and struct.               
  7376.                                                                  
  7377. OPTIONS                                                          
  7378.      Options can be specified at the command line, or to the     
  7379.      command interpreter.                                        
  7380.  
  7381.      The -v (verbose on) option forces ftp to show all responses 
  7382.      from the remote server, as well as report on data transfer  
  7383.      statistics.                                                 
  7384.                                                                  
  7385.      The -n option restrains ftp from attempting "auto-login"    
  7386.      upon initial connection.  If auto-login is enabled, ftp     
  7387.      checks the netrc file in the user's home directory for an   
  7388.      entry describing an account on the remote machine. If no    
  7389.      entry exists, ftp will prompt for the remote machine login  
  7390.      name (default is the user identity on the local machine),   
  7391.      and, if necessary, prompt for a password and an account with
  7392.      which to login.                                             
  7393.                                                                  
  7394.      The -i option turns off interactive prompting during        
  7395.      multiple file transfers.                                    
  7396.                                                                  
  7397.      The -d option enables debugging.                            
  7398.                                                                  
  7399.      The -g option disables file name globbing.                  
  7400.                                                                  
  7401. THE .netrc FILE                                                  
  7402.      The .netrc file contains login and initialization           
  7403.      information used by the "auto-login" process.  It resides in
  7404.      the user's home directory.  The following tokens are        
  7405.      recognized; they may be separated by spaces, tabs, or new-  
  7406.      lines:                                                      
  7407.                                                                  
  7408.      machine name                                                
  7409.           Identify a remote machine name.  The auto-login process
  7410.           searches the .netrc file for a machine token that      
  7411.           matches the remote machine specified on the ftp command
  7412.           line or as an open command argument.  Once a match is  
  7413.           made, the subsequent .netrc tokens are processed,      
  7414.           stopping when the end of file is reached or another    
  7415.           machine token is encountered.                          
  7416.                                                                  
  7417.      login name                                                  
  7418.           Identify a user on the remote machine.  If this token  
  7419.           is present, the "auto-login" process will initiate a   
  7420.           login using the specified name.                        
  7421.                                                                  
  7422.      password string                                             
  7423.           Supply a password.  If this token is present, the      
  7424.           "auto-login" process will supply the specified string  
  7425.           if the remote server requires a password as part of the
  7426.           login process.  Note that if this token is present in  
  7427.           the .netrc file, ftp will abort the "auto-login"       
  7428.           process if the .netrc is readable by anyone besides the
  7429.           user.                                                  
  7430.     account string                                              
  7431.           Supply an additional account password.  If this token  
  7432.           is present, the "auto-login" process will supply the   
  7433.           specified string if the remote server requires an      
  7434.           additional account password, or the "auto-login"       
  7435.           process will initiate an ACCT command if it does not.  
  7436.                                                                  
  7437.      macdef name                                                
  7438.           Define a macro.  This token functions like the ftp    
  7439.           macdef command functions.  A macro is defined with the
  7440.           specified name; its contents begin with the next .netrc
  7441.           line and continue until a null line (consecutive new- 
  7442.           line characters) is encountered.  If a macro named init
  7443.           is defined, it is automatically executed as the last   
  7444.           step in the "auto-login" process.                      
  7445.                                                                  
  7446. SEE ALSO                                                         
  7447.      csh(1).                                                    
  7448.      ftpd(1M) in the UMAX V Administrator's Reference Manual.   
  7449.                                                                 
  7450. BUGS                                                            
  7451.      Correct execution of many commands depends upon proper     
  7452.      behavior by the remote server.                             
  7453.                                                                 
  7454.      An error in the treatment of carriage returns in the 4.2BSD
  7455.      UNIX ASCII-mode transfer code has been corrected.  This    
  7456.      correction may result in incorrect transfers of binary files
  7457.      to and from 4.2BSD servers using the ascii type.  Avoid this
  7458.      problem by using the binary image type.
  7459. APPENDIX L:  telnet COMMANDS REFERENCE
  7460.  
  7461.  
  7462. NAME
  7463.      telnet - user interface to the TELNET protocol
  7464.  
  7465. SYNOPSIS
  7466.      telnet [ host [ port ] ]
  7467.  
  7468. DESCRIPTION
  7469.      The telnet command communicates with another host using the
  7470.      TELNET protocol. If telnet is invoked without arguments, it
  7471.      enters command mode, indicated by its prompt (for example,
  7472.      telnet>).  In this mode, it accepts and executes the
  7473.      commands listed below. If it is invoked with arguments, it
  7474.      performs an open command (see below) with those arguments.
  7475.      Once a connection has been opened, telnet enters input mode.
  7476.      The input mode entered will be either character at a time or
  7477.      line by line depending on what the remote system supports.
  7478.  
  7479.      In character at a time mode, most text typed is immediately
  7480.      sent to the remote host for processing.
  7481.      In line by line mode, all text is echoed locally, and
  7482.      (normally) only completed lines are sent to the remote host.
  7483.      The local echo character (initially ^E) may be used to turn
  7484.      off and on the local echo (this would mostly be used to
  7485.      enter passwords without the password being echoed).
  7486.  
  7487.      In either mode, if the localchars toggle is TRUE (the
  7488.      default in line mode; see below), the user's quit, intr, and
  7489.      flush characters are trapped locally, and sent as TELNET
  7490.      protocol sequences to the remote side.  There are options
  7491.      (see toggle autoflush and toggle autosynch below) which
  7492.      cause this action to flush subsequent output to the terminal
  7493.      (until the remote host acknowledges the TELNET sequence) and
  7494.      flush previous terminal input (in the case of quit and
  7495.      intr).
  7496.  
  7497.      While connected to a remote host, telnet command mode may be
  7498.      entered by typing the telnet escape character (initially
  7499.      ^]).  When in command mode, the normal terminal editing
  7500.      conventions are available.
  7501.  
  7502. COMMANDS
  7503.      The following commands are available.  Only enough of each
  7504.      command to uniquely identify it need be typed (this is also
  7505.      true for arguments to the mode, set, toggle, and display
  7506.      commands).
  7507.      open host [ port ]
  7508.               Open a connection to the named host. If no port
  7509.               number is specified, telnet attempts to contact a
  7510.               TELNET server at the default port.  The host
  7511.               specification can be either a host name (see
  7512.               hosts(4)) or an Internet address specified in "dot
  7513.               notation" (see inet(3N)).
  7514.  
  7515.      close    Close a TELNET session and return to command mode.
  7516.  
  7517.      quit     Close any open TELNET session and exit telnet.  An
  7518.               end-of-file (in command mode) will also close a
  7519.               session and exit.
  7520.  
  7521.      <ctrl>Z  Suspend telnet.  This command only works when the
  7522.               user is using the csh(1) or the BSD application
  7523.               environment version of ksh(1).
  7524.  
  7525.      status   Show the current status of telnet.  This includes
  7526.               the peer one is connected to, as well as the
  7527.               current mode.
  7528.  
  7529.      display [ argument ... ]
  7530.               Displays all, or some, of the set and toggle values
  7531.               (see below).
  7532.  
  7533.      ? [ command ]
  7534.               Get help.  With no arguments, telnet prints a help
  7535.               summary.  If a command is specified, telnet will
  7536.               print the help information for just that command.
  7537.  
  7538.      send arguments
  7539.               Sends one or more special character sequences to
  7540.               the remote host.  The following are the arguments
  7541.               which may be specified (more than one argument may
  7542.               be specified at a time):
  7543.  
  7544.               escape
  7545.                    Sends the current telnet escape character
  7546.                    (initially ^]).
  7547.  
  7548.               synch
  7549.                    Sends the TELNET SYNCH sequence.  This
  7550.                    sequence causes the remote system to discard
  7551.                    all previously typed (but not yet read) input.
  7552.                    This sequence is sent as TCP urgent data (and
  7553.                    may not work if the remote system is a 4.2 BSD
  7554.                    system -- if it doesn't work, a lower case r
  7555.                    may be echoed on the terminal).
  7556.               brk
  7557.                    Sends the TELNET BRK (Break) sequence, which
  7558.                    may have significance to the remote system.
  7559.  
  7560.               ip
  7561.                    Sends the TELNET IP (Interrupt Process)
  7562.                    sequence, which should cause the remote system
  7563.                    to abort the currently running process.
  7564.  
  7565.               ao
  7566.                    Sends the TELNET AO (Abort Output) sequence,
  7567.                    which should cause the remote system to flush
  7568.                    all output from the remote system to the
  7569.                    user's terminal.
  7570.  
  7571.               ayt
  7572.                    Sends the TELNET AYT (Are You There) sequence,
  7573.                    to which the remote system may or may not
  7574.                    choose to respond.
  7575.  
  7576.               ec
  7577.                    Sends the TELNET EC (Erase Character)
  7578.                    sequence, which should cause the remote system
  7579.                    to erase the last character entered.
  7580.  
  7581.               el
  7582.                    Sends the TELNET EL (Erase Line) sequence,
  7583.                    which should cause the remote system to erase
  7584.                    the line currently being entered.
  7585.  
  7586.               ga
  7587.                    Sends the TELNET GA (Go Ahead) sequence, which
  7588.                    likely has no significance to the remote
  7589.                    system.
  7590.  
  7591.               nop
  7592.                    Sends the TELNET NOP (No operation) sequence.
  7593.  
  7594.               ?
  7595.                    Prints out help information for the send
  7596.                    command.
  7597.  
  7598.      set argument value
  7599.               Set any one of a number of telnet variables to a
  7600.               specific value.  The special value off turns off
  7601.               the function associated with the variable.  The
  7602.               values of variables may be interrogated with the
  7603.               display command.  The variables which may be
  7604.               specified are:
  7605.               echo
  7606.                    This is the value (initially ^E) which, when
  7607.                    in line by line mode, toggles between doing
  7608.                    local echoing of entered characters (for
  7609.                    normal processing), and suppressing echoing of
  7610.                    entered characters (for entering, say, a
  7611.                    password).
  7612.               escape
  7613.                    This is the telnet escape character (initially
  7614.                    ^[) which causes entry into telnet command
  7615.                    mode (when connected to a remote system).
  7616.  
  7617.               interrupt
  7618.                    If telnet is in localchars mode (see toggle
  7619.                    localchars below) and the interrupt character
  7620.                    is typed, a TELNET IP sequence (see send ip
  7621.                    above) is sent to the remote host.  The
  7622.                    initial value for the interrupt character is
  7623.                    taken to be the terminal's intr character.
  7624.  
  7625.               quit
  7626.                    If telnet is in localchars mode (see toggle
  7627.                    localchars below) and the quit character is
  7628.                    typed, a TELNET BRK sequence (see send brk
  7629.                    above) is sent to the remote host.  The
  7630.                    initial value for the quit character is taken
  7631.                    to be the terminal's quit character.
  7632.  
  7633.               flushoutput
  7634.                    If telnet is in localchars mode (see toggle
  7635.                    localchars below) and the flushoutput
  7636.                    character is typed, a TELNET AO sequence (see
  7637.                    send ao above) is sent to the remote host.
  7638.                    The initial value for the flush character is
  7639.                    taken to be the terminal's flush character.
  7640.  
  7641.               erase
  7642.                    If telnet is in localchars mode (see toggle
  7643.                    localchars below), and if telnet is operating
  7644.                    in character at a time mode, then when this
  7645.                    character is typed, a TELNET EC sequence (see
  7646.                    send ec above) is sent to the remote system.
  7647.                    The initial value for the erase character is
  7648.                    taken to be the terminal's erase character.
  7649.               kill
  7650.                    If telnet is in localchars mode (see toggle
  7651.                    localchars below), and if telnet is operating
  7652.                    in character at a time mode, then when this
  7653.                    character is typed, a TELNET EL sequence (see
  7654.                    send el above) is sent to the remote system.
  7655.                    The initial value for the kill character is
  7656.                    taken to be the terminal's kill character.
  7657.  
  7658.               eof
  7659.                    If telnet is operating in line by line mode,
  7660.                    entering this character as the first character
  7661.                    on a line will cause this character to be sent
  7662.                    to the remote system.  The initial value of
  7663.                    the eof character is taken to be the
  7664.                    terminal's eof character.
  7665.  
  7666.      toggle arguments ...
  7667.               Toggle (between TRUE and FALSE) various flags that
  7668.               control how telnet responds to events.  More than
  7669.               one argument may be specified.  The state of these
  7670.               flags may be interrogated with the display command.
  7671.               Valid arguments are:
  7672.  
  7673.               localchars
  7674.                    If this is TRUE, then the flush, interrupt,
  7675.                    quit, erase, and kill characters (see set
  7676.                    above) are recognized locally, and transformed
  7677.                    into (hopefully) appropriate TELNET control
  7678.                    sequences (respectively ao, ip, brk, ec, and
  7679.                    el; see send above).  The initial value for
  7680.                    this toggle is TRUE in line by line mode, and
  7681.                    FALSE in character at a time mode.
  7682.  
  7683.               autoflush
  7684.                    If autoflush and localchars are both TRUE,
  7685.                    then when the ao, intr, or quit characters are
  7686.                    recognized (and transformed into TELNET
  7687.                    sequences; see set above for details), telnet
  7688.                    refuses to display any data on the user's
  7689.                    terminal until the remote system acknowledges
  7690.                    (via a TELNET Timing Mark option) that it has
  7691.                    processed those TELNET sequences.  The initial
  7692.                    value for this toggle is TRUE if the terminal
  7693.                    user had not done an stty noflsh, otherwise
  7694.                    FALSE (see stty(1)).
  7695.  
  7696.               autosynch
  7697.                    If autosynch and localchars are both TRUE,
  7698.                    then when either the intr or quit characters
  7699.                    is typed (see set above for descriptions of
  7700.                    the intr and quit characters), the resulting
  7701.                    TELNET sequence sent is followed by the TELNET
  7702.                    SYNCH sequence.  This procedure should cause
  7703.                    the remote system to begin throwing away all
  7704.                    previously typed input until both of the
  7705.                    TELNET sequences have been read and acted
  7706.                    upon.  The initial value of this toggle is
  7707.                    FALSE.
  7708.               crmod
  7709.                    Toggle carriage return mode.  When this mode
  7710.                    is enabled, most carriage return characters
  7711.                    received from the remote host will be mapped
  7712.                    into a carriage return followed by a line
  7713.                    feed.  This mode does not affect those
  7714.                    characters typed by the user, only those
  7715.                    received from the remote host.  This mode is
  7716.                    not very useful unless the remote host only
  7717.                    sends carriage return, but never line feed.
  7718.                    The initial value for this toggle is FALSE.
  7719.  
  7720.               debug
  7721.                    Toggles socket level debugging (useful only to
  7722.                    the super-user).  The initial value for this
  7723.                    toggle is FALSE.
  7724.  
  7725.               options
  7726.                    Toggles the display of some internal telnet
  7727.                    protocol processing (having to do with TELNET
  7728.                    options).  The initial value for this toggle
  7729.                    is FALSE.
  7730.  
  7731.               netdata
  7732.                    Toggles the display of all network data (in
  7733.                    hexadecimal format).  The initial value for
  7734.                    this toggle is FALSE.
  7735.  
  7736.               ?
  7737.                    Displays the legal toggle commands.
  7738.  
  7739. SEE ALSO
  7740.      csh(1), ksh(1), rlogin(1N).
  7741.      inet(3N), services(4), hosts(4) in the UMAX V Programmer's
  7742.      Reference Manual.
  7743.      telenetd(1M) in the UMAX V Administrator's Reference Manual.
  7744.  
  7745. BUGS
  7746.    There is no adequate way for dealing with flow control.
  7747.    On some remote systems, echo has to be turned off manually
  7748.    when in line by line mode.
  7749.  
  7750.    There is enough settable state to justify a .telnetrc file.
  7751.  
  7752.    No capability for a .telnetrc file is provided.
  7753.  
  7754.    In line by line mode, the terminal's eof character is only
  7755.    recognized (and sent to the remote system) when it is the
  7756.    first character on a line.
  7757. APPENDIX M:  domax1 AND domax0 HARDWARE CONFIGURATION
  7758.  
  7759.  
  7760.                        ┌─────────┐
  7761.                        │Cassette │
  7762.                        │  Drive  │
  7763.                        │         │          ┌────────┐  ┌────────┐ 
  7764.                        └────┬────┘          │  Disk  │  │  Disk  │ 
  7765.                             │               │  Drive │  │  Drive │
  7766.                             │               │        │  │        │ 
  7767. ┌────────┐            ┌─────┴──────────────┐└───────┬┘  └─┬──────┘ 
  7768. │  Tape  ├────────────┤                    ├────────┴─────┴──────────────
  7769. │ Drive  │            │                    │                              
  7770. └────────┘            │     4 X 2 MIP      ├────────┴─────┴─────┴─────┴──
  7771. ┌────────┐            │                    │                                 
  7772. │  Tape  │            │    Multimax 310    ├────────┴─────┴─────┴─────┴──
  7773. │ Drive  ├────────────┤                    │                                 
  7774. └────────┘            │                    ├────────┴─────┴─────┴─────┴──   ┌──────────────┐
  7775.                       └──┬────────────┬────┘                                │     Port     │
  7776.                          │            │        ┌──────────────┐             │   Selector   │  
  7777.                          │            ├────────┤   Console    │             │              │ 
  7778.                          │       ┌────┴──────┐ │   Hardcopy   │             └─┬──┬──┬──┬──┬┘ 
  7779.                          │       │  Console  │ │              │               │  │  │  │  │ 32 Lines
  7780.                          │       │           │ └──────────────┘             ┌─┴──┴──┴──┴──┴┐
  7781.                          │       │    CRT    │                              │              │
  7782.                          │       └───────────┘                              │   Annex 01   │
  7783.                          │                                                  │              │
  7784.                          │                                                  └───────┬──────┘
  7785. Ethernet  ───────────────┴────────────────────────────────────────────┬─────────────┴───────────────
  7786.                                                                 ┌─────┴─────┐  
  7787.                                                                 │ Annex 00  │  
  7788.                                                                 │           │  
  7789.                                                                 └──┬─────┬──┘  
  7790.                                                           ┌────────┴─┐ ┌─┴────────┐
  7791.                                                           │  mtlzr   │ │  mt_600  │
  7792.                                                           │          │ │          │
  7793.                                                           └──────────┘ └──────────┘        
  7794.  
  7795.                                             NOTES
  7796. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  7797. APPENDIX N:  BASIC UNIX REVIEW
  7798.  
  7799.  
  7800. Write the letter(s) of the UNIX component that best fit each
  7801. description.
  7802.  
  7803.  
  7804. K  =  Kernel         S  =  Shell          U  =  Utilities             D  =  Directory
  7805.  
  7806.  
  7807. _____         1.     Uses standard syntax for all commands.
  7808.  
  7809. _____         2.     Schedules tasks and manages data storage.
  7810.  
  7811. _____         3.     Memory resident code.
  7812.  
  7813. _____         4.     Main interface between UNIX and users.
  7814.  
  7815. _____         5.     Heart of the operating system.
  7816.  
  7817. _____         6.     Can be easily combined to perform the exact
  7818.                      function which the user desires.
  7819.  
  7820. _____         7.     Path name concept.
  7821.  
  7822. _____         8.     Written mostly in the "C" programming language.
  7823.  
  7824. _____         9.     Multi-level directory structure.
  7825.  
  7826. _____         10.    Uses pipes and filters.
  7827.  
  7828. _____         11.    Supports control structures.
  7829.  
  7830. _____         12.    Includes text processing, electronic mail, file
  7831.                      manipulation, and program generation.
  7832.                                             NOTES
  7833. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  7834.                                             INDEX
  7835.  
  7836.  
  7837. . (dot)..................................................................................63
  7838. .. (dot dot).............................................................................63
  7839. Access modes.............................................................................37
  7840. Annex Commands
  7841.        call..............................................................................16
  7842.        hangup............................................................................21
  7843. BourneShell prompt........................................................................6
  7844. BSD UNIX..................................................................................2
  7845. Current working directory................................................................63
  7846. Expiration period........................................................................19
  7847. FTP Commands............................................................................108
  7848.        !................................................................................116
  7849.        ?................................................................................123
  7850.        cd...............................................................................119
  7851.        close............................................................................121
  7852.        get remote-file..................................................................113
  7853.        help.............................................................................123
  7854.        lcd..............................................................................115
  7855.        ls...............................................................................120
  7856.        open host........................................................................109
  7857.        Password.........................................................................110
  7858.        put..............................................................................117
  7859.        quit.............................................................................122
  7860.        status...........................................................................124
  7861. Kernel...................................................................................33
  7862. KornShell.................................................................................2
  7863. Mailx Commands...........................................................................74
  7864.        ?.................................................................................82
  7865.        d.................................................................................80
  7866.        S.............................................................................77, 78
  7867. MICOM....................................................................................14
  7868. Number links.............................................................................37
  7869. On-line manual pages.....................................................................25
  7870. Ownership and group affiliation..........................................................37
  7871. Parent...................................................................................64
  7872. Password.................................................................................19
  7873. Pathname.................................................................................57
  7874. PROCOMM+.................................................................................14
  7875. Protections..............................................................................34
  7876. Redirection..........................................................................94, 95
  7877. Root directory............................................................................4
  7878. Scrolling................................................................................10
  7879. Shell.....................................................................................1
  7880. Standard input...........................................................................93
  7881. Standard output..........................................................................93
  7882. Subdirectory.............................................................................61
  7883. System V UNIX.............................................................................2
  7884. TAB.....................................................................................153
  7885. TCP/IP..................................................................................107
  7886. Terminal nodes............................................................................3
  7887. UMAX.....................................................................................19
  7888. UNIX Commands
  7889.        assist...........................................................................151
  7890.        cancel............................................................................48
  7891.        cat...............................................................................40
  7892.        cd................................................................................61
  7893.        chmod.............................................................................35
  7894.        cp............................................................................49, 50
  7895.        exit..............................................................................20
  7896.        file..............................................................................39
  7897.        lp................................................................................45
  7898.        lpstat............................................................................47
  7899.        ls................................................................................37
  7900.        mkdir.............................................................................58
  7901.        mv................................................................................62
  7902.        pg................................................................................42
  7903.        pwd...............................................................................57
  7904.        rmdir.............................................................................59
  7905.        tail..............................................................................43
  7906. UNIX filesystem...........................................................................3
  7907. UNIX Keyboard Function Commands
  7908.        #..................................................................................9
  7909.        @..................................................................................9
  7910.        Ctrl-D............................................................................20
  7911.        Ctrl-Q............................................................................10
  7912.        Ctrl-S............................................................................10
  7913.        Delete............................................................................10
  7914.        Hold Screen.......................................................................10
  7915. UNIX Primer Plus........................................................................153
  7916. vi Commands
  7917.        :!shell-cmd......................................................................147
  7918.        :q!..............................................................................145
  7919.        :r !shell-cmd....................................................................147
  7920.        :r filename......................................................................147
  7921.        :w...............................................................................145
  7922.        :w newfile.......................................................................147
  7923.        :wq..............................................................................146
  7924. Wildcards...............................................................................100
  7925. 
  7926. Downloaded From P-80 International Information Systems 304-744-2253
  7927.